Question

In: Computer Science

c++ language, using Xcode Suppose the membership at a fitness club is $500 for individual, $800...

c++ language, using Xcode

Suppose the membership at a fitness club is $500 for individual, $800 for couple and $1200 for 4 people. Every month, the manager at the club says that guests will get discounts for one service per month. He provides you with the list of services that will get a discount:

Your program will be reading in a file which contains a list of services at a fitness club. The discount is determined by the type of service. For example, the file is as follows:

Cafe: Smoothies

SPA: Hair and Skin

Training: 90 day challenge

Aquatics: Kids free training session

Your program should read this file and offer this discount:

If the service is Cafe, then discount is 1% of annual fitness club fee.

If the service is SPA, then discount is 10% of the annual fitness club fee.

If the service is Training, then discount is 15% of the annual fitness club fee.

If the service is Aquatics, then no discount, but program should only offer it for the family memberships.

Your program should ask the user what type of membership they have. Based on the type of membership, your program should calculate the dollar amount discount per service and list all applicable services and benefits for that user.

Your program should be reading the file in and calculating the benefits based on the type of membership. Your program should also randomly pick among the 4 discounts or 3 depending on the type of membership and display which discount the member gets for this month.

Solutions

Expert Solution

#include <iostream>
#include<bits/stdc++.h>
#include<string>

using namespace std;

float individual_price = 5000;
float couple_price = 8000;
float people_4_price = 12000;

float total_price_individual = 0;
float total_price_couple = 0;
float total_price_people_4 = 0;


int main()
{
// Initialize String Array
    string services[4] = {"cafe", "spa", "training", "aquatics"};
     cout<<"Available services"<<"\n";


    // Print Strings
    for (int i = 0; i < 4; i++)
        cout << services[i] << "\n";
    int service_choosen;
    service_choosen = rand() % 3;         // v1 in the range 0 to 99
    cout << service_choosen << "\n";

    if (service_choosen == 0)
        {
            cout<<"you choose the service of Cafe : Smoothies"<<"\n";

            string str;

            cout << "Please Enter Membership Type : \n";
            getline (cin, str);
            cout << "Hello,you choose " << str << "\n";
        if (str == individual)
                   {
                   total_price_individual = 5000 + (5000*0.01);
                   cout <<"your total cost for all services are : ";
                   cout << total_price_individual;
            }
        else if (str == couple)
                   {
                   total_price_couple = 8000 + (8000*0.1);
                   cout <<"your total cost for all services are : ";
                   cout << total_price_couple;
            }
        else if (str == people_4)
                   {
                   total_price_people_4 = 12000 + (12000*0.15);
                   cout <<"your total cost for all services are : ";
                   cout << total_price_people_4;
            }
        else
                   cout<<"you put wrong choice";

        }

    if (service_choosen == 1)
        {
            cout<<"you choose the service of spa : Hair and skin "<<"\n";

            string str;

            cout << "Please Enter Membership Type : \n";
            getline (cin, str);
            cout << "Hello,you choose " << str << "\n";
        if (str == individual)
                   {
                   total_price_individual = 5000 + (5000*0.01);
                   cout <<"your total cost for all services are : ";
                   cout << total_price_individual;
            }
        else if (str == couple)
                   {
                   total_price_couple = 8000 + (8000*0.1);
                   cout <<"your total cost for all services are : ";
                   cout << total_price_couple;
            }
        else if (str == people_4)
                   {
                   total_price_people_4 = 12000 + (12000*0.15);
                   cout <<"your total cost for all services are : ";
                   cout << total_price_people_4;
            }
        else
                   cout<<"you put wrong choice";

        }
    if (service_choosen == 2)
        {
            cout<<"you choose the service of Training : 90 Days challenge"<<"\n";

            string str;

            cout << "Please Enter Membership Type : \n";
            getline (cin, str);
            cout << "Hello,you choose " << str << "\n";
        if (str == individual)
                   {
                   total_price_individual = 5000 + (5000*0.01);
                   cout <<"your total cost for all services are : ";
                   cout << total_price_individual;
            }
        else if (str == couple)
                   {
                   total_price_couple = 8000 + (8000*0.1);
                   cout <<"your total cost for all services are : ";
                   cout << total_price_couple;
            }
        else if (str == people_4)
                   {
                   total_price_people_4 = 12000 + (12000*0.15);
                   cout <<"your total cost for all services are : ";
                   cout << total_price_people_4;
            }
        else
                   cout<<"you put wrong choice";

        }

    if (service_choosen == 3)
        {
            cout<<"you choose the service of Aquatics: Kids free training session"<<"\n";

            string str;

            cout << "Please Enter Membership Type : \n";
            getline (cin, str);
            cout << "Hello,you choose " << str << "\n";
        if (str == individual)
                   {
                   total_price_individual = 5000 + (5000*0.01);
                   cout <<"your total cost for all services are : ";
                   cout << total_price_individual;
            }
        else if (str == couple)
                   {
                   total_price_couple = 8000 + (8000*0.1);
                   cout <<"your total cost for all services are : ";
                   cout << total_price_couple;
            }
        else if (str == people_4)
                   {
                   total_price_people_4 = 12000 + (12000*0.15);
                   cout <<"your total cost for all services are : ";
                   cout << total_price_people_4;
            }
        else
                   cout<<"you put wrong choice";

        }


   return 0;
}


This program will run only one time .

and if you want to execute it many times , just put in while loop and condition is of your choice.


Related Solutions

The following is information pertaining to a local fitness club, Fitness for Life. Month Club Membership...
The following is information pertaining to a local fitness club, Fitness for Life. Month Club Membership (number of members) Total Operating Costs July 450 $                      8,900 August 480 $                      9,800 September 500 $                   10,100 October 550 $                   10,150 November 560 $                   10,500 December 525 $                   10,200 1. By looking at the Total Operating Costs and the Average Operating Costs Per Member, can you tell whether the club's operating costs are variable, fixed, or mixed? 2. Perform Regression analysis using Microsoft Excel. What is the monthly operating...
Task 1: BetterHealth is a membership-based fitness club in Toronto. Customers can purchase a membership that...
Task 1: BetterHealth is a membership-based fitness club in Toronto. Customers can purchase a membership that provides a fixed number (e.g. 100) of free visits to the club upon registration. When the initial number of visits runs out, they can purchase additional visits as needed. All types of fitness equipment and all fitness classes offered in the club are open for this membership. Please write a Java program (Membership.java) for membership management. The Membership class should have the following public...
A country club has a membership of 500 members and operates facilities that include a swimming...
A country club has a membership of 500 members and operates facilities that include a swimming pool and a gymnasium. The club president would like to know how many members regularly use the facilities. A survey of the members indicates that 70% regularly use the swimming pool (S), 50% regularly use the gymnasium (G), and 5% use neither of these facilities regularly. Calculate the probability of the club members who use the facilities of the swimming pool and gymnasium P(S∩G).           ...
(IN C LANGUAGE) The cost to become a member of a fitness center is as follows:...
(IN C LANGUAGE) The cost to become a member of a fitness center is as follows: (a) the senior citizens discount is 30% (b) if the membership is bought and paid for 12 or more months, the discount is 15% (c) if more than five personal training sessions are bought and paid for, the discount on each session is 20% Write a that determines the cost of a new membership. Your program must contain: a function that displays the general...
Suppose that C = 800, I = 300, G = 200, and X = -100.
Suppose that C = 800, I = 300, G = 200, and X = -100. a. Calculate GDP. b. Calculate each of the four components of GDP. c. Suppose G increases to 300 and GDP increases to 1,500. What is the new government component?
(Use C++ language) The Bunker Hill Health Club would like you to create a program where...
(Use C++ language) The Bunker Hill Health Club would like you to create a program where users can sign up for memberships. They have three types: Single Membership ($200/year), Family Membership ($350/year), and Membership Plus ($450/year). Your program should display a menu of the membership types and a fourth choice labeled 'Quit', if they don't want to join. Use a Switch-Case decision structure where a message would be displayed stating the membership type they chose and the yearly cost. A...
500-800 words Using words, not numbers, explain how an inventory turnover computation is performed, what it...
500-800 words Using words, not numbers, explain how an inventory turnover computation is performed, what it means, and what its use is. Please do the same for a receivable turnover computation.
Programming Language Required: C Write a multithreaded program in C (not c++) using the pthread library...
Programming Language Required: C Write a multithreaded program in C (not c++) using the pthread library and dynamic memory(malloc) that multiplies two matrices together. The numbers in the matrices must be read in from a text file. The program should also check if the two matrices are capable of being multiplied together. The amount of threads used has to be dynamic. The user should be able to choose how many threads they wish to use using the command line. Finally,...
Done in C language using mobaxterm if you can but use basic C This program is...
Done in C language using mobaxterm if you can but use basic C This program is broken up into three different functions of insert, delete, and main. This program implements a queue of individual characters in a circular list using only a single pointer to the circular list; separate pointers to the front and rear elements of the queue are not used. The linked list must be circular.      The insert and remove operations must both be O(1)    You...
C Mini Project is a mini application that could be developed using C language that involves...
C Mini Project is a mini application that could be developed using C language that involves the concepts of arrays, functions, read and write data techniques. Based on your creativity, you are required to plan, design and develop a mini application for an organisation. You may choose to from the list below or propose your own mini application: 1. Customer Billing System 2. Employee Record System 3. Contact Management System 4. Appointment Management System 5. Attendance Record System Your responsibility...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT