Question: Objectives To learn to code, compile and run a program containing REPETITION structures Assignment Plan and code a program utilizing one or more repetition structures
Objectives
To learn to code, compile and run a program containing REPETITION structures
Assignment
Plan and code a program utilizing one or more repetition structures to solve the following problem:
Write a program for Pentagon Parking Lot for all customers that use the lot during the day. The lot opens at :
AM and closes at : PM Charges for vehicles are based upon the following rates:
Cars: First hours Free
Next hours $ per hour
Next hours $ per hour
Trucks: First hours Free
Next hours $ per hour
Next hours $per hour
Senior Citizens: No charge
Have the user enter a character designation for rate of charge C T S the starting time and ending time in
military time for parking lot use. Determine the total number of hours. Any part of an hour is to be counted as a
full hour. Compute the appropriate charge and print out a ticket for each customer. Be sure to check for invalid
data and handle it appropriately. Print out the total fees for each type of rate charged during the entire day
Input
Rate designation C T S starting time, ending time. Be sure to check Cars, Trucks and seniors with different
times parked.
Output
Itemized listing of charges for each vehicle, and an itemized summary of all charges for the day
Note
Adequately check entered data for validity. Use adequate test data to process all valid data and representative
data to show how your program handles invalid data.
Label all output clearly. Be sure your output file contains user prompts and what was entered by the user in
addition to the results of your program processing.
BE SURE TO INCLUDE ADEQUATE ERROR HANDLING IN YOUR PROGRAM AND ERROR DATA WHEN YOU RUN THE
PROGRAM TO DEMONSTRATE ERROR HANDLING.
Turn in
Program listing and program output. Program documentation and first lines in the output file should include:
Last Name, First Name
Class Section Number, Day, Time
Lab Number and Assignment Due Date
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
