Question
UKY Parking: You are in-charge of visitor parking decks at UKY. Your job is to create a Parking class, which has a string variable to
UKY Parking: You are in-charge of visitor parking decks at UKY. Your job is to create a Parking class, which has a string variable to identify the decks (For example: Blue Deck, East Deck, Union Lot, Rupp Deck). Create a constructor to allow users to initialize the name of the deck. For each of these deck you need a data member to store the number of spots that are occupied. Create member functions that increments the spots occupied by one and another function with same name (overload it) which accepts an integer argument and adds it to the existing spot. Create functions that return the name, occupancy, and revenue of each spots. (Consider each spot occupied for the entire day for simplicity and daily rate of a spot as $6). For every deck, display the following information: name of the deck, occupancy, and revenue. Finally, display the total occupancy of all decks and the revenue (static method is preferred). Test the class with at least three visitor parking decks via input from a user.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started