Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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

Databases A Beginners Guide

Authors: Andy Oppel

1st Edition

007160846X, 978-0071608466

More Books

Students also viewed these Databases questions

Question

8. Do the organizations fringe benefits reflect diversity?

Answered: 1 week ago

Question

7. Do the organizations social activities reflect diversity?

Answered: 1 week ago