PRO192_-_PE01_-_FA_2024_2886.webp
H

PRO192_-_PE01_-_FA_2024_2886.webp

Do not format the result.
The program output might look something like this:
Enter name: Aves
Enter name: Aves
Enter name: Aves
Enter name: Aves
Enter weight: 10
Enter weight: 10
Enter weight: 20
Enter weight: 25
1. Test getName()
1. Test getName()
1. Test getName()
1. Test getName()
2. Test set Weight()
2. Test setWeight()
2. Test set Weight()
2. Test setWeight()
3. Test toString()
3. Test toString()
3. Test toString()
3. Test toString()
Enter TC (1, 2 or 3): 1
Enter TC (1, 2 or 3): 2
Enter TC (1, 2 or 3): 2
Enter TC (1, 2 or 3): 3
OUTPUT:aves
Enter new weight: 0
Enter new weight: 25
OUTPUT:aves, 25,30
OUTPUT:5
OUTPUT:30
3 of 4 Paper No: 1
Question 2:
Question 2: (3 marks)
-Define a Vehicle class and a Truck class extending from Vehicle (i.e. Vehicle is an abstract class and it is a superclass, Truck is a subclass) with the following information:
Vehicle
- model:String
Where:
Vehicle(model: String, fuel Type: String,
- fuelType: String
fuel Efficiency: double): parameterized
- fuelEfficiency: double
constructor that sets values to model, fuel Type,and fuel Efficiency
Zoom

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

Thông tin

Category
PRO192
Thêm bởi
Hương Mai
Ngày thêm
Lượt xem
3,913
Lượt bình luận
0
Rating
0.00 star(s) 0 đánh giá

Image metadata

Filename
PRO192_-_PE01_-_FA_2024_2886.webp
File size
209 KB
Dimensions
1920px x 1009px

Share this media

Back
Bên trên Bottom