Create a class called Vehicle that will hold a string

  1. Create a class called Vehicle that will hold a string Medium and int Wheels as public properties.
  2. Create a class called Car that is derived from Vehicle and contains a Make property and a Model property.These are both strings
  3. Override the toString method for class Car.It should print the Make and Model.
  4. Create a SportCar class that is derived from Car.Add an int NumberOfDoors property.
  5. Override the toString method for SportsCar so that it prints “I am a fast moving Sports Car.”.
  6. Create a Truck class that is derived from Car.Add a decimal property called Tons and a Boolean called FourWheelDrive.
  7. Override the toString method for Truck so that it prints the Make whether this truck is a 4 Wheel Drive truck.
  8. Add Generic Lists of the appropriate Type called myCars, MySportsCars, and myTrucks.
  9. 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.
  10. Copy these books from mySportsCars and myTrucks to the myCars List.
  11. Add a list box and display the Cars by iterating through the myCars list. Show the Make and Model
  12. Add exception handling to the application.Print exceptions in a list box.

 

Leave a Comment

Your email address will not be published. Required fields are marked *

GradeEssays.com
We are GradeEssays.com, the best college essay writing service. We offer educational and research assistance to assist our customers in managing their academic work. At GradeEssays.com, we promise quality and 100% original essays written from scratch.
Contact Us

Enjoy 24/7 customer support for any queries or concerns you have.

Phone: +1 213 3772458

Email: support@gradeessays.com

© 2024 - GradeEssays.com. All rights reserved.

WE HAVE A GIFT FOR YOU!

15% OFF 🎁

Get 15% OFF on your order with us

Scroll to Top