Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C + + Programming Refresher: Parking Garage This first assignment consists of a small program that will help refresh your memory of C programming and

C++ Programming Refresher: Parking Garage
This first assignment consists of a small program that will help refresh your
memory of C programming and get your mind back into thinking logically and
critically. You should find this program easy. Please be sure to validate your
data; use proper form and structure of a program; and provide professional
looking output. Once finished, upload your source code to the appropriate
assignments in Moodle. Remember! Do not turn in your program if it does not
compile! Your programs must work correctly and follow all instructions for you to
receive full credit. Ask if you need help ;)
Write an application that calculates the parking fee for a car for one day. The
parking garage charges a $2.50 minimum fee for up to three hours. The garage
charges an additional $1.00 per hour for each hour or partial hour in excess of
three hours. The maximum charge is $20.00 for a 24 hour period. Assume that
no car parks for longer than 24 hours at a time; validate your code as such. Your
application should ask for a total time parked in a decimal format (eg.2.75
hours) and then state the total parking charge for the day. Your code should
run and produce an error message even if I type in a letter instead of a number!
Continue to calculate as long as the user wishes to.

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