Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The cost to become a member of a fitness center is as follows: the membership fee per month is $50.00 the personal training session fee

The cost to become a member of a fitness center is as follows:

the membership fee per month is $50.00

the personal training session fee is $30.00

the senior citizens discount is 30%

if the membership is bought and paid for 12 or more months, the discount is 15%;

if more than five personal training sessions are bought and paid for, the discount on each session is 20%.

Write a program that determines the cost of a new membership. Your program must contain a function that displays the general information about the fitness center and its charges, a function to get all the necessary information to determine the membership cost, and a function to determine the membership cost. Your program must also be a menu driven program. Given the user 2 options as follows:

a. Calculate membership costs.

b. quit this program. If the user enters a as the option, then display general information, get their details and calculate costs. Then display the menu again. If the user enters b, quit the program with an appropriate message. This must loop continuously until the user enters b to quit. (Do not use any global variables.) Requirements: You must use the given function prototypes. You can add more functions if you like. void information(); void getInfo(bool &senior, int &months, int &personal); double calcCost(bool senior, int months, int personal);

Points will be awarded for the following attributes of your solution:

a. If your program does not compile, you get only 3 points irrespective of what the error is.

b. If it compiles, I check and deduct points for the following: i. Your file name must be a05.cpp ii. Your header section must have Sources: line to include any sources you may have used. iii. The quality of your source code (Form). In particular, pay attention to your indentation, capitalization, and so forth. Be sure to read the class C++ style guide before working on this problem. However, if you follow the style used in the book you will be fine!

c. Program works as specified, and does not have the above-mentioned deficits, full points will be awarded.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions