Question

In: Computer Science

(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 default message of 'Invalid choice' should appear if they don't enter a valid entry.

Solutions

Expert Solution

#include<iostream>
using namespace std;
int main()
{
        int choice;//variable used to store the selected choice 
        cout<<"Menu"<<"\n"<<"1. Single Membership-$200/Year"<<"\n"<<"2. Family Membership-$350/Year"<<"\n"<<"3.Membership Plus-$450/Year"<<"\n"<<"4.Quit, if you don't want to join."<<endl;
        cout<<"Enter your choice to sign up for membership "<<endl;//Displays menu and its options
        cin>>choice;//read the entered choice
        switch(choice)
        {
                case 1: cout<<"You have chosen Single Membership and yearly cost is $200";// if choice is "1" then it will be printed
                                break;
                case 2: cout<<"You have chosen Family Membership and yearly cost is $350";// if choice is "2" then it will be printed
                                break;
                case 3: cout<<"You have chosen  Membership Plus and yearly cost is $450";// if choice is "3" then it will be printed
                                break;
                case 4: cout<<"You are successfully quit from the window";// if choice is "4" then it will be printed
                                break;
                default: cout<<"You entered invalid choice";// if the choice is other than 1,2,3,4 it is printed
        }
        return 0;
}

OUTPUT:shown for every case

Please comment if you have any doubts.

Rtae please!!!!!


Related Solutions

C language Write a program in C to implement Queue and its operation (like create, insert,...
C language Write a program in C to implement Queue and its operation (like create, insert, delete, search) using array data structure.
Write a program to create a tree randomly. You can use C++ programming language. The input...
Write a program to create a tree randomly. You can use C++ programming language. The input is the number of vertices in the tree, and the output is an adjacent list of the tree. (Managed to complete this assignment with a binary tree. But, was told I needed a general tree instead)
Using (C programming language) Create a health monitoring program, that will ask user for their name,...
Using (C programming language) Create a health monitoring program, that will ask user for their name, age, gender, weight, height and other health related questions like blood pressure and etc. Based on the provided information, program will tell user BMI, blood pressure numbers if they fall in healthy range or not and etc. Suggestions can be made as what should be calorie intake per day and the amount of exercise based on user input data. User should be able to...
Use Visual Basic Language In this assignment you will need to create a program that will...
Use Visual Basic Language In this assignment you will need to create a program that will have both a “for statement” and an “if statement”. Your program will read 2 numbers from the input screen and it will determine which is the larger of the 2 numbers. It will do this 10 times. It will also keep track of both the largest and smallest numbers throughout the entire 10 times through the loop. An example of the program would be...
(Use C++ language) CREATE A PROGRAM CALLED and or not.cpp THAT: ASKS USER FOR AGE Note:...
(Use C++ language) CREATE A PROGRAM CALLED and or not.cpp THAT: ASKS USER FOR AGE Note: you must be 18 or older to vote && is the symbol for And | | is the symbol for Or ! is the symbol for Not USE AND, OR, OR NOT TO SEE IF THEY'RE OLD ENOUGH TO VOTE and display appropriate message USE AND, OR, OR NOT TO SEE IF THEY ENTERED A NUMBER LESS THAN 0 and display appropriate message USE...
Use C++ language Create a program which will ask the user to input three songs for...
Use C++ language Create a program which will ask the user to input three songs for a playlist (you may use TV shows or movies, if you prefer). Declare three strings to store each of the songs. Use getline to receive the input. Display output which lists each of the songs (or movies or tv shows), on separate lines, with a title on the first line: My Playlist. Insert three lines of comments at the beginning of the program for...
How would I create a program in C++ where you build and maintain two binary search...
How would I create a program in C++ where you build and maintain two binary search trees of information? I have already created the file reader which I will list on the end. The 2 binary search trees should be controlled by the Operations: L -- for launching a satellite, which will save it's info to the first set or D -- for deorbit the satellite. The other operations I'm looking to implement are: F -- for find, where user...
this program is to be done in c language. Using Pointers Create a program pointerTester.c to...
this program is to be done in c language. Using Pointers Create a program pointerTester.c to experiment with pointers. Implement the following steps one by one in your program: YOU NEED TO ANSWER QUESTION Use printf to print your answers at the end(after 12). 1. Declare three integer variables a, b and c. Initialize them to 0, 100 and 225, respectively. 2. Print the value of each variable and its address. 3. Add the following declaration to your code: int...
Using C++, you will create a program, where you will create two doubly linked lists. These...
Using C++, you will create a program, where you will create two doubly linked lists. These doubly linked lists will contain integers within them. Using the numbers in both of these linked lists, you add the numbers together, and insert the addition of the two numbers into a singly linked list. the input can be from the user or you just write the input. for example, if one number in the doubly linked list is 817 and in the other...
Language: Java Create a TryIt.java program with a main method. You are going to use this...
Language: Java Create a TryIt.java program with a main method. You are going to use this program to demonstrate some things about how Java works. Make your methods here private, because they are not intended to be called from outside the program. For each test below, make sure that you print to the console: 1) What is being tested 2) The desired output 3) The actual output Question to be answered: Should you use == or the String method equals...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT