PRO192_-_PE_-_SP_2024_-_Block_5_1920.webp
E

PRO192_-_PE_-_SP_2024_-_Block_5_1920.webp

-source:Stringyear.int
+Wood()
+Wood(source:String, year:int)
+getSource():String
+getYear():int
+setYear(year:int):void
Wood()-default constructor.
Wood(source:String, year:int) constructor, which sets values to source and year.
getSource():String returns a string s, which is obtained by removing the last character of source string.
getYear():int-return year.
setYear(year:int):void update year new year-old year.
Do not format the result.
The program output might look something like:
Enter source: wood1
Enter source: wood1
Enter year: 5
Enter year: 1
1. Test getSource()
1. Test getSource()
2. Test setYear()
2. Test setYear()
Enter TC (1 or 2): 1
Enter TC (1 or 2): 2
OUTPUT:
Enter new year: 5
wood
OUTPUT:4
Zoom
90%

Close
Chưa có bình luận nào.

Thông tin

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

Image metadata

Filename
PRO192_-_PE_-_SP_2024_-_Block_5_1920.webp
File size
126.7 KB
Dimensions
1193px x 792px

Share this media

Back
Bên trên Bottom