PRO192_-_PE_-_SP_2025_-_Block_5_3850.webp
S

PRO192_-_PE_-_SP_2025_-_Block_5_3850.webp

-color:String
☑Kizspy.me -melting:int
+Wax()
+Wax(color:String, melting:int)
+getColor():String
+getMelting():int
+setMelting(melting:int):void

Wax()-default constructor.
• Wax(color:String, melting:int) constructor, which

sets values to color and melting.
getColor():String
returns a string s, which is
obtained by replacing the first character of the color
string with the melting.
⚫ getMelting():int-return melting.
⚫ setMelting(melting:int):void update melting=new
melting * 3.
The program output might look something like:
Enter color: green
Enter melting: 11
Do not format the result.
Enter color: green
Enter melting: 11
Zoom
1. Test getColor()
2. Test setMelting()
Enter TC (1 or 2): 1
OUTPUT:
11reen
1. Test getColor()
2. Test setMelting()
Enter TC (1 or 2): 2
Enter new melting: 22
OUTPUT:
66
+100%
Close
Chưa có bình luận nào.

Thông tin

Category
PRO192
Thêm bởi
strong_will
Ngày thêm
Lượt xem
10,230
Lượt bình luận
0
Rating
0.00 star(s) 0 đánh giá

Share this media

Back
Bên trên Bottom