PRO192_-_FA_2024_-_PE_2884.webp
T

PRO192_-_FA_2024_-_PE_2884.webp

Crow
Where:
-origin:String
-weight:int
+Crow()
+Crow(origin:String, weight:int)
+getOrigin():String
+getWeight():int
+setWeight(weight:int):void
Crow() - default constructor.
Crow(origin:String, weight:int) constructor, which sets values to origin and weight.
getOrigin():String returns a string s, which is obtained by concatenating the weight before the original string.
getWeight():int - return weight.
setWeight(weight:int):void weight + 3.update weight=new
Do not format the result.
The program output might look something like:
Enter origin: crow
Enter origin: crow
Enter weight: 2
Enter weight: 1
1. Test getOrigin()
1. Test getOrigin()
2. Test setWeight()
2. Test setWeight()
Enter TC (1 or 2): 1
Enter TC (1 or 2): 2
OUTPUT:
Enter new weight: 2
2crow
OUTPUT:
Zoom
+ 100%
Close
Chưa có bình luận nào.

Thông tin

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

Image metadata

Filename
PRO192_-_FA_2024_-_PE_2884.webp
File size
167.6 KB
Dimensions
1920px x 803px

Share this media

Back
Bên trên Bottom