0% found this document useful (0 votes)
5 views1 page

Java_Lab1_Instructions

The document outlines the requirements for Lab1 of the CSc3350 Software Development course. It instructs students to create a subclass SUV.java that extends the Automobile class, adding new attributes and overriding the getinfo() method. Students must submit their Automobile.java and SUV.java files along with a screenshot of the output from VS Code in specified graphic formats.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views1 page

Java_Lab1_Instructions

The document outlines the requirements for Lab1 of the CSc3350 Software Development course. It instructs students to create a subclass SUV.java that extends the Automobile class, adding new attributes and overriding the getinfo() method. Students must submit their Automobile.java and SUV.java files along with a screenshot of the output from VS Code in specified graphic formats.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

CSc3350: Software Development Lab1

Submit the files into Lab1 Assignment under Assessments


Given a Lab1.java program and partial Automobile.java class, create a sub-class called SUV.java
with a super constructor that initializes the attributes of the Automobile class as well as new
attributes of the following types:
 int for number of passengers: numpass
 double for cargo space: cargospc

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

the output from Automobile class is:

The programmer is: Dr. Johnson

Make: Porsche
Model: 911 ST
Year: 2025
Number of Wheels: 4

the output from SUV class is:


The programmer is: Dr. Johnson

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

You might also like