Assignment:
My friend, Cary Parker, owns a small parking garage downtown. She wants you to write a program to help her calculate the parking charge at the payment booth.
The price to park in the lot is $5.50 per hour, plus city parking tax. However, partial hours (even one minute into an additional hour) are charged at the full hour’s rate. For example, if you park for exactly 60 minutes, or less, you will pay $5.50 plus tax, but if you park for 61 minutes you will pay $11.00 plus tax. At 121 minutes you will pay $16.50 plus tax, and so on. The city parking tax is calculated at 9.5% of the parking fee.
Cary operates her parking lot using a 24 hour clock, so, for example, half past midnight is 00:30, 10:30 am is 10:30, and 10:30pm is 22:30. The garage closes at midnight, so you don't have to worry about entering the garage one day and leaving the next.
Sample Dialog
Welcome to Cary Parker’s Garage
Time of Entry (Hour): 11
Time of Entry (Minute): 35
Time of Exit (Hour): 14
Time of Exit (Minute): 25
You parked for 3 hours.
The parking fee is $16.50
The city tax is $1.57
Your total charge is $18.07
Thank you for using Cary Parker’s Garage
Note: Could you plz go through this code and let me
know if u need any changes in this.Thank You
_________________
#include <iostream>
#include <iomanip>
#include <ctime>
#include <cstdlib>
using namespace std;
int main()
{
//Declaring constants
const double CHARGES_PER_HR=5.50;
const double TAX_RATE=9.5;
//setting the precision to two decimal places
std::cout << std::setprecision(2) <<
std::fixed;
//Declaring variables
int entryHours,exitHours,entryMins,exitMins,diffhrs,diffmins;
double parkingCharges,taxRate,totalCharge=0;
cout<<"Welcome to Cary Parker’s Garage"<<endl;
//Getting the input entered by the user
cout<<"Time of Entry (Hour): ";
cin>>entryHours;
cout<<"Time of Entry (Minute): ";
cin>>entryMins;
cout<<"Time of Exit (Hour): ";
cin>>exitHours;
cout<<"Time of Exit (Minute): ";
cin>>exitMins;
//Performing calculations
diffhrs=(exitHours-entryHours);
diffmins=(exitMins-entryMins);
if(diffmins<0)
{
parkingCharges=diffhrs*CHARGES_PER_HR;
}
else if(diffmins>0)
{
parkingCharges=(diffhrs+1)*CHARGES_PER_HR;
diffhrs++;
}
taxRate=parkingCharges*(9.5/100);
//Displaying the output
cout<<"You parked for "<<diffhrs<<"
hours"<<endl;
cout<<"The parking fee is
$"<<parkingCharges<<endl;
cout<<"The city tax is
$"<<taxRate<<endl;
totalCharge=parkingCharges+taxRate;
cout<<"Your total charge is
$"<<totalCharge<<endl;
cout<<"Thank you for using Cary Parker's
Garage"<<endl;
return 0;
}
___________________________
Output:
_______________Could you plz rate me well.Thank
You
Assignment: My friend, Cary Parker, owns a small parking garage downtown. She wants you to write...
Use the description from Parking Ticket Simulator from Chapter 14 as a basis, where you need to create a Car class and Police Officer class, to create a new simulation. Write a simulation program (refer to the Bank Teller example in the PPT) that simulates cars entering a parking lot, paying for parking, and leaving the parking lot. The officer will randomly appear to survey the cars in the lot to ensure that no cars are parked beyond their time...
What rates should be charged? Downtown Parking Authority In January a meeting was held in the office of the mayor of Oakmont to discuss a unicipal parking facility. The participants included the mayor, the traffic proposca the administrator of Oakmont's Downtown Parking Authority, the city planner, and the finance director. The purpose of the meeting was to consider a report Richard Stockton, executive assistant to the Parking Authority's administrator, concerning estimated costs and revenues for the proposed facility. Mr. Stockton's...
What additional information, if any, should be obtained before making a final decision? Downtown Parking Authority In January a meeting was held in the office of the mayor of Oakmont to discuss a unicipal parking facility. The participants included the mayor, the traffic proposca the administrator of Oakmont's Downtown Parking Authority, the city planner, and the finance director. The purpose of the meeting was to consider a report Richard Stockton, executive assistant to the Parking Authority's administrator, concerning estimated costs...
This is a c++ program. Use the description from Parking Ticket Simulator (listed below) as a basis, where you need to create a Car class and Police Officer class, to create a new simulation. Write a simulation program (refer to the Bank Teller example listed below) that simulates cars entering a parking lot, paying for parking, and leaving the parking lot. The officer will randomly appear to survey the cars in the lot to ensure that no cars are parked...
Rush Inuit is an impulsive, fly-by-the-seat-of-his-pants kind of guy. His best friend, Stu Earley, is the exact opposite – cautious and reluctant. The two are recent UNCG graduates who roomed together all … ahem … eight years. You know who they are even though they graduated last year because everyone on campus knows Rush and Stu – they’re legends on the social scene. To make ends meet during college, Rush and Stu organized fun trips to exciting destinations and charged...
Luisa Fernandez pulled into a parking spot behind one of Superado’s stores on the outskirts of Seville but paused before getting out of the car. This was usually the best part of her week—visiting one of her company’s supermarkets, talking to the store manager, walking through the aisles, watching employees interact with the customers. She’d been doing it since she was a little girl, tagging along with her father as he grew his business from one small market in central...
Zipcar: “It’s Not About Cars—It’s About Urban Life” Imagine a world in which no one owns a car. Cars would still exist, but rather than owning cars, people would just share them. Sounds crazy, right? But Scott Griffith, CEO of Zipcar, the world’s largest car-share company, paints a picture of just such an imaginary world. And he has nearly 800,000 passionate customers—or Zipsters, as they are called—who will back him up. Zipcar specializes in renting out cars by the hour...
Hi, Kindly assist with my project management assignment below using the attached case study Question 1 Update the project charter for the remainder of the project in response to Adams’ memo (lines 241 through 246). Question 2 Prepare a plan for the remainder of the project in response to Adams’ memo (lines 241 through 246). Your answers to the above will be assessed in terms of the level of communication displayed, the insights and inferences drawn, and your ability to...