Question: This week we will work with classes by creating a virtual garage. Your program will use the inheritance diagram below in order to create a

This week we will work with classes by creating a virtual garage. Your program will use the inheritance diagram below in order to create a parent class and two child classes.

Your program will prompt the user to create at least one object of each type (Car and Pickup). Using a menu system and capturing user input your program will allow the user the choice of adding a car or pickup truck and define the vehicle's attributes. The program will use user input to define the vehicle's attributes.

The following is a detailed list of what your virtual garage must include.

A Vehicle class that contains all the methods and attributes outlined in the class diagram below.

A Car class that is a child class of the Vehicle class with the methods and attributes detailed in the class diagram below.

A Pickup class is a child class of the Vehicle class with the methods and attributes detailed in the class diagram below.

This week we will work with classes by creating a virtual garage.

\begin{tabular}{|c|} \hline Vehicle \\ Attributes \\ String VehicleMake \\ String VehicleModel \\ Methods \\ SetVehicleMake \\ SetVehicleModel \\ GetVehicleMake \\ GetVehicleModel \\ \hline \end{tabular}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!