● The Faculty & Staff parking permit allows a car to park in YELLOW and GREEN...

90.2K

Verified Solution

Question

Programming

● The Faculty & Staff parking permit allows a car to park inYELLOW and GREEN slots. User

can purchase multiple Faculty & Staffparking permit.

● The Student parking permit allows a car to park in GREENslots. User can purchase multiple

student parking permit.

● The Resident parking permit allows a car to park in ORANGE andGREEN slots. User can add

a premium package to this kind of permit that allows one ofuser’s friend to share this permit, but

each user can only purchase one Resident parking permit.

● The Visitor parking permit allows a car to park in ORANGE,YELLOW and GREEN slots.

The permit is only valid for one day and user can only purchaseone Visitor parking permit.

User can purchase more than one type of ticket at a time, asmany Faculty & Staff and student as

they choose.

Your goal is to write a program that sells the permits and usingthe existing functions in

hw4a.cpp.

//---------------------------------------------------------------------------//   This is the main program that you need to write//---------------------------------------------------------------------------int main (){  // Variable Declarations  char Choice = '\0';  // what the user enters  int NumPermits = 0;  // how many permits they want to buy  int TotalPermits = 0; // total number of permit sold so far  float Price = 0.0;  // the price of one set of permit  float TotalPrice = 0.0;  // the total price of all permits  char ExitChoice = 'N'; //whether or not the user wants to exit  // Print your name and ID  cout << \"Name: \n\"    <<\"ID: \n\n\";          // Loop until the user is done     // Print the main menu describing the tickets offered         // Ask the user type what permit they want to purchase next          // If the user selects Faculty&Staff parking permit calculate the price of tickets           // If the user selects Student parking permit be sure to note the reference parameters     // If the user selects Resident parking permit, ask if they want the premium package           // If the user selected visitor parking permit, make sure they decided to order them         // Add the permit price to a running total                //Add the number of permits to a running total        // Ask if they want to continue (Y or N)        // When the loop is done   // Print out the total number of permits sold, and the amount of all the permits, with a $.   return 0;}

Answer & Explanation Solved by verified expert
4.4 Ratings (852 Votes)
include using namespace std int main Variable Declarations char Choice 0 what the    See Answer
Get Answers to Unlimited Questions

Join us to gain access to millions of questions and expert answers. Enjoy exclusive benefits tailored just for you!

Membership Benefits:
  • Unlimited Question Access with detailed Answers
  • Zin AI - 3 Million Words
  • 10 Dall-E 3 Images
  • 20 Plot Generations
  • Conversation with Dialogue Memory
  • No Ads, Ever!
  • Access to Our Best AI Platform: Flex AI - Your personal assistant for all your inquiries!
Become a Member

Other questions asked by students