Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

objective The objective of this homework is to write a ParkingLot class and a program to simulate the running of 3 parking lots at an

image text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribed

objective The objective of this homework is to write a ParkingLot class and a program to simulate the running of 3 parking lots at an airport. Task 1: In Linux, create a program with the following specification 1. Create a program called parking .cpp which contains a Parking Lot class. and stores information about a parking lot: name, number of spots, daily rate current occupied 2. Your full program will help an airport nun 3 parking lots: Economy, Standard, and Premium. When run, it should present a menu to allow a car to enter each of the 3 ots, exit each of the 3 lots, give stats on the 3 lots, or quit. The available spots and rate per lot is up to you. 3. To support your program, your ParkingLot class should have the following a. Store 4 private variables: name, number of spots, daily rate, current occupied. Since these are private, the exact variable names do not matter. b. A setter and getter for each of the 4 variables listed above getName setName getNumspots set Numspots iii. getRate set Rate getoccupied, setoccupied c. Implement a carEnter function which emulates a car entering the ot. Watch edge cases when the lot is full d. Implement a carExit function which emulates a car leaving the lot. Wach edge cases when the lot is empty. e. Implement a get Profit function which retums how much profit will be made with the current rate and occupancy f Implement a printstats function to print out the statistics for the lot, including the occupancy rate g. When compiled with g++ Wall parking.cpp, no warnings are given

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Excel As Your Database

Authors: Paul Cornell

1st Edition

1590597516, 978-1590597514

More Books

Students also viewed these Databases questions

Question

3. What are potential solutions?

Answered: 1 week ago