Question: Membership Application Implemented in C++ Create a Windows program named LaboS-Membership in a suitable folder Copy the completed project folder to H:ICSIS123 and turn in
Membership Application Implemented in C++ Create a Windows program named LaboS-Membership in a suitable folder Copy the completed project folder to H:ICSIS123 and turn in a copy on drive X: Prompt the user for a family name and store the response (no spaces allowed) in a string variable. Prompt for code showing type of membership requested-Regular or Lifetime. Accept reply in char variable. Prompt to request the number of memberships to purchase. Store user answer in an int variable. Use the cout stream object for output prompts. Extract input values with cin. Use appropriate variable types to hold user responses. To calculate the cost of memberships, place three named constant declarations with these values at the beginning of the main routine: const double REGULAR COST 85.0e; const double LIFETIME_COST495.80; const double DISCOUNT Based on user input for membership type (R or L), assign one of the two named constant amounts for the chosen type of membership to a cost variable for use in calculations. Use an if structure to select and assign the proper cost value. (Suggestion: check for an uppercase or lowercase L' to indicate lifetime membership. Let any other answer assign regular membership-the else portion of the structure.) When 5 or more memberships are ordered, the user is entitled to a discounted price. Multiply the assigned cost by the named constant for the current discount and subtract this value from the full membership cost 1. Declare a membership cost variable to hold the price of one single membership (if L is entered, assign -8.32; LIFETIME COST to membership cost, else assume R and assign REGULAR COST to that variable) 2. If number of memberships is 5 or more, calculate a discount price and adjust membership cost accordingly 3. Multiply this membership cost by the number of memberships requested to calculate the total amount. CAVCProjectsLabe02-Membership DebugiMembershipexe Enter Fanily nane: Harper Reg or Life-R/1.? 1 Enter Fanily nane: Rohertson Reg or Life R/L? R Menbership coune: 1 nenherships e 85.8 85.88 re## any key to continue Henberahip count: 2 2 nenbershipa e 495.88998.08 ress any key to cont inue CIVCProjectrilLabe02-Membership Debug Membership.exe Enter Fanily nane: Sunners Reg or Life - R/L? n Menbership count: 8 CVCProjectsLaba02-MembershiphDebugMembership.ese Enter Fanily nane: Granville Reg or Life-R/1.? 1 Henbership count: 5 8 nenberships 57.88462.40 S nenberships $336.68 1683.0 ress any key to continue ress any key to continue Display calculated results at the console, on a line following the three user prompts and responses Include the
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
