Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Create a class called Vehicle that will hold a string Medium and int Wheels as public properties. Create a class called Car that is derived
- Create a class called Vehicle that will hold a string Medium and int Wheels as public properties.
- Create a class called Car that is derived from Vehicle and contains a Make property and a Model property.These are both strings
- Override the toString method for class Car.It should print the Make and Model.
- Create a SportCar class that is derived from Car.Add an int NumberOfDoors property.
- Override the toString method for SportsCar so that it prints “I am a fast moving Sports Car.”.
- Create a Truck class that is derived from Car.Add a decimal property called Tons and a Boolean called FourWheelDrive.
- Override the toString method for Truck so that it prints the Make whether this truck is a 4 Wheel Drive truck.
- Add Generic Lists of the appropriate Type called myCars, MySportsCars, and myTrucks.
- Add the cars listed below as Sports Cars and Trucks to their respective list (mySportsCars and MyTrucks).Do this in a method in the form named CreateVehicles called from Load.
- Copy these books from mySportsCars and myTrucks to the myCars List.
- Add a list box and display the Cars by iterating through the myCars list. Show the Make and Model
- Add exception handling to the application.Print exceptions in a list box.
Step by Step Solution
★★★★★
3.32 Rating (146 Votes )
There are 3 Steps involved in it
Step: 1
Use the following link to download the entire solution httpsdrivegoogl...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started