2. Test setAge()
2. Test setAge()
Enter TC (1 or 2): 1
Enter TC (1 or 2): 2
OUTPUT:
1dove
Enter new age: 2
OUTPUT:
1
Question 2:
(3 marks) Write a class Flight and a class SpecFlight extending from Flight (i.e. Flight is a superclass and SpecFlight is a subclass) with the following information:
Flight
Where:
-code:String
getCode():String - return code.
-duration:int
getDuration():int - return duration.
Zoom
+ 100%
Close