Question: CSIS 123 C++ Programming Fundamentals Labos - Membership Membership Application Implemented in C++ Create a Windows program named Labos- Membership in a suitable folder. Copy
CSIS 123 C++ Programming Fundamentals Labos - Membership 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.00; const double LIFETIME_COST - 495.ee; const double DISCOUNT - 0.32; 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 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. CWC Projects\Laba02-Membership Debug Membershipere CCProjects Labo02-Membership Debug Membership.ee Enter Fantly mane: Robertson Enter Family name: Harper Rey er Life - HAL? L Rey or Life - BLY R Membership count: 1 Membership count2 - 2 nenberships @ $495.00 1 memberships @ $ 85.00 $85. $ 999,00 Press any key to continue.. Press any key to continue CAVC ProjectsLab 02-Membership Debug Membership.exe CAVC Projectilaba 2 Membership Debug Membership.ee Enter Family name: Sunners Reg or Life - RAL? Membership count: 8 Enter Fanily name: Granville Rey or Life - R/L? 1 Membership count: 5 S nenberships e$ 336.68 - 8 menberships @ $ 52.88 - $462.48 $ 1683.88 Press any key to continue ... Press any key to continue ... Display calculated results at the console, on a line following the three user prompts and responses. Include the string class library to enable input and output of string values. Add the
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
