Car rental System 1. Task Description ①
Car Rental: Display all available cars in the system, select the car you want to rent, enter the rental person has a taxi.
②
: Select car information in the list of cars, enter the number of days to rent, calculate the rent
③ New car storage: Need to enter the car's model, color, use time and daily rent, if the truck is also to enter the truck load. 2. Build the system ① Create the class: Transportation Class (abstract class), Automobile class, truck class. Truck vehicles inherit the vehicle class, the load is the special property of truck
② creates a collection of car information that stores car rental information and displays the data in the corresponding control (due to the unique properties of the truck) that must be stored with list<vehicle>. If you use Datagradeview to display the data, you cannot display the truck's payload, all use the ListView to display the data (to the ListView, first to add the first column showing the data is the license plate number, the remainder of the properties of the car)
(How to add data to the ListView control)
3. Function realization
① Car Rental ② car
③ New Car Storage
Inheritance and multi-state combat, the car rental system