Answered step by step
Verified Expert Solution
Link Copied!

Question

00
1 Approved Answer

Please make sure your answer meets all the requirements below. Thank you! Write a C++ console application that calculates and displays the charges for multiple

Please make sure your answer meets all the requirements below. Thank you!

Write a C++ console application that calculates and displays the charges for multiple customers using a parking garage.

The parking garage charges a minimum fee of $3.00 to park for up to three hours.

The garage charges an additional $0.85 per hour or fraction of an hour for parking over three hours.

The maximum charge for any given 24-hour period is $20.00. You may assume that no car parks for longer than 24 hours at a time.

Your program will use a function named calculateCharges to determine the charges based on the amount of time the car was parked.

Your program will prompt the user for the number of hours parked in the garage.

It will then display the parking charges for that transaction.

Keep track of the number of transactions as well as accumulating the number of hours parked and the parking charges.

Your program will execute repeatedly until the user enters a value for the number of hours parked that is less than or equal to zero.

Your program will then display the number of transactions and totals for the number of hours parked and the parking charges.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered 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

Students also viewed these Databases questions