Inheritance and multi-state combat, the car rental system

Source: Internet
Author: User
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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.