Parking lot program-defines automobile base class

Assignment Help Basic Computer Science
Reference no: EM132410666

Parking lot Program - Inheritance

Write a complete C++ program with Inheritance.

Your program should achieve:

1. There are N parking Spaces in the Parking lot, each of which can be used for different types of vehicle (automobiles), including trucks, cars, and buses, but one parking space can hold 0 or 1 Car at a time. If there is no free parking space, a message will be displayed, and no parking space will be arranged for the vehicle.

2. The program simulates the parking situation of the vehicle: if there is space for the new vehicle, allocate the parking space for the vehicle in
order; Parking fee should be paid when the vehicle drives away.

3. The parking lot can display the license plate number of the currently parked vehicles and the current fees of all parking vehicle (income).

4. Defines Automobile base class as Automobile, including data member as license plate number (string).

5. Define the derived classes Truck, Car, Bus. In addition to having license plate numbers, these vehicles also have different attributes. Truck includes load-carrying properties (floating point number, unit: ton); Car also has a attribute as brand (string), and the Bus includes an authorized number of passengers (integer). In addition, each derived class implements the pay() function to display vehicle information and pay for parking. Here, Truck charges 3 dollar/time, Car charges 1 dollar/time, and Bus charges 2 dollar/time.

Reference no: EM132410666

Questions Cloud

Local grocery store has multiple checkout lanes : In a local grocery store has multiple checkout lanes. Each cashier is trained to handle an average of 20 customers per hour.
Compare and contrast two different types of hotels : Compare and Contrast two different types of Hotels. What are advantages and disadvantages of both.
Describe the different types of security violations : Describe the different types of security violations and give example for each type of security violations. How can we protect against these security violations
What information has surprised or shocked you : In at least 250-words, explain at least three insights you've gained in this foundational week of criminal theories and practice. Some example questions you.
Parking lot program-defines automobile base class : Parking lot Program. Defines Automobile base class as Automobile, including data member as license plate number (string).
EPMG 681 Project Management Governance Assignment : EPMG 681 Project Management Governance Assignment Help and Solution, Athabasca University, Canada. Assignment: Memorandum to senior management
Describe your personal professional goals and objectives : The Assignment (1-2 pages): Identify and describe your personal professional goals and objectives within the parameters of the field education experience.
Discuss the importance of using the mmpi-2-rf : Discuss the importance of using the MMPI-2-RF when assessing the emotional status of a client. Can the MMPI-2-RF be useful in assessing mental status as well?
Corporate strategy and functional strategy : What is the difference between corporate strategy and functional strategy?

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Identifies the cost of computer

identifies the cost of computer components to configure a computer system (including all peripheral devices where needed) for use in one of the following four situations:

  Input devices

Compare how the gestures data is generated and represented for interpretation in each of the following input devices. In your comparison, consider the data formats (radio waves, electrical signal, sound, etc.), device drivers, operating systems suppo..

  Cores on computer systems

Assignment : Cores on Computer Systems:  Differentiate between multiprocessor systems and many-core systems in terms of power efficiency, cost benefit analysis, instructions processing efficiency, and packaging form factors.

  Prepare an annual budget in an excel spreadsheet

Prepare working solutions in Excel that will manage the annual budget

  Write a research paper in relation to a software design

Research paper in relation to a Software Design related topic

  Describe the forest, domain, ou, and trust configuration

Describe the forest, domain, OU, and trust configuration for Bluesky. Include a chart or diagram of the current configuration. Currently Bluesky has a single domain and default OU structure.

  Construct a truth table for the boolean expression

Construct a truth table for the Boolean expressions ABC + A'B'C' ABC + AB'C' + A'B'C' A(BC' + B'C)

  Evaluate the cost of materials

Evaluate the cost of materials

  The marie simulator

Depending on how comfortable you are with using the MARIE simulator after reading

  What is the main advantage of using master pages

What is the main advantage of using master pages. Explain the purpose and advantage of using styles.

  Describe the three fundamental models of distributed systems

Explain the two approaches to packet delivery by the network layer in Distributed Systems. Describe the three fundamental models of Distributed Systems

  Distinguish between caching and buffering

Distinguish between caching and buffering The failure model defines the ways in which failure may occur in order to provide an understanding of the effects of failure. Give one type of failure with a brief description of the failure

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd