+getWeight():int
+setWeight(weight:int):void
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:
2crow
Enter new weight: 2
OUTPUT:5
Question 2:
+ 100%
Zoom
Close