Question: Write a C++ program for a Car parking lot using a classes. You will fulfill the following requirements The Car Parking lot has 20 parking

Write a C++ program for a Car parking lot using a classes. You will fulfill the following requirements

  • The Car Parking lot has 20 parking spaces (Use array of Car objects )
  • The parking spaces are numbered from 1 to 20 (Parking lot capacity is 20)
  • You will assign the parking space to a car when it enters the parking lot
  • You will mark the space empty when the car vacate the parking space
  • Your program should inform the Car driver if no space is available in the parking lot (Parking lot is full)
  • Your program should be able to report at any time number of spaces that are occupied and number of vacant spaces
  • At night your program should empty the Parking Lot (Assume any car parked after hours will be towed away)

Write a driver program to test the requirements

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!