Java_Lab1_Instructions
Java_Lab1_Instructions
Do not change anything in the Lab1.java file. Within the Automobile class, expand the getinfo()
method to print the output shown below. (make, model, year, num wheels). Next, create a
subclass SUV.java that overrides the Automobile class' getinfo() method and adds printing for
the numpass, and cargospc.
The Lab1.java program has these as data for constructing an Automobile and an SUV object.
Porsche
911 ST
2025
4
Subaru
Outback
2025
4
5
6.7
Make: Porsche
Model: 911 ST
Year: 2025
Number of Wheels: 4
Make: Subaru
Model: Outback
Year: 2025
Number of Wheels: 4
Passengers: 5
Cargo space: 6.7
UPLOAD: your Automobile.java and SUV.java file, then a screen shot of the VS code output as a
graphic file type: PNG, JPEG, PDF, WebP