Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

c++ coding!! Include using pointers, inheritance. Below is what the program should be able to do. Below is a description of the program in paragraph.

c++ coding!! Include using pointers, inheritance.

Below is what the program should be able to do.

image text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribed

Below is a description of the program in paragraph.

image text in transcribed

Here's a similar code that I used for similar program.

#include  using namespace std; class GymMembership { public: GymMembership(); bool createm(int id, string name1); //create function void printStatus(); bool extend(int id,int add); //extend function bool canceReservations(int id); //cancel function bool deletem(int id); //delete function private: int id; string name1; }; static int newreserve [10][3]; //array that holds the member's id and months of subscription static int i=1; // ... GymMembership::GymMembership() { int subscrbmth; } bool GymMembership::createm(int id, string name1) //function that creates a new member with id and name { newreserve[i][0]=id; newreserve[i][1]=0; std::cout> command; GymMembership createmem; if (command=="create"){ cout>id; cout>name1; createmem.createm(id, name1); } if (command=="extend"){ int add=0 ; cout>id; std::cout>add; createmem.extend(id,add); } if (command=="cancel"){ int cancel=0; createmem.canceReservations(id); } if (command=="delete"){ int cancel=0; cout>id; createmem.deletem(id); } } return 0; } 
Structure Member: Name, age, id (integer) Classes Membership: Gym Access Annual ($600), Gym Access Monthly ($80), Specific Program (Hot yoga and Pilates) ($250) Subclass Specific Program Instructor Available Hot Yoga Instructors: Brown, Johnson, Williams (There are five available spots for each instructor) Available Pilates Instructors: Wilson, Davis, Smith (same condition as above) *specific program (hot yoga and pilates) runs for 4 weeks *you cannot cancel once subscribed to special programs Functions included -create profile for new members (name, age, gender, id) -add a subscription -delete subscription (exception to specific programs) -pay for subscription -remove member profile (once checked all subscriptions are paid) -view account Welcome! 01: create an account 02: join membership 03: remove membership 04: payment 05: delete account 06: access to account // if entered 01, this must be printed (separated by space) Name, Age, ID: Input Amy 22 123 Output Welcome, Amy! 01: create an account 02: join membership 03: remove membership 04: payment 05: delete account 06: access to account // if entered 02, this must be printed Available subscriptions 01: Access To Gym (Annual: $600) 02: Access To Gym (Monthly: $80) 03: Special Program: Hot Yoga (4 weeks: $250) 04: Special Program: Pilates (4 weeks: $250) Member ID, subscription #: Input 123 03 Output Please choose an instructor: Brown, Johnson, Williams // if input is Brown, print Subscribed to membership 03, Brown. Available spots for Brown: 45 Welcome! 01: create an account 02: join membership Welcome! 01: create an account 02: join membership 03: remove membership 04: payment 05: delete account 06: access to account // if entered 02 again, this must be printed Available subscriptions 01: Access To Gym (Annual: $600) 02: Access To Gym (Monthly: $80) 03: Special Program: Hot Yoga (4 weeks: $250) 04: Special Program: Pilates (4 weeks: $250) Member ID, subscription #: Input 123 02 Output Subscribed to membership 02 Welcome! 01: create an account 02: join membership 03: remove membership 04: payment 05: delete account 06: access to account // if entered 06, this must be printed Member ID: Input 123 Output Name: Amy Age: 22 ID: 123 Subscription(s): 02, 03 Payment status: 02 ($80) unpaid, 03 ($250) unpaid Welcome! 01: create an account 02: join membership 03: remove membership 04: payment 05: delete account 06: access to account // if entered 05, this must be printed Member ID: Input 123 Output Member ID 123 has unpaid memberships. Please try again after making a payment. Welcome! 01: create an account 02: join membership 03: remove membership 04: payment 05: delete account 06: access to account // if entered 03, this must be printed Member ID, subscription #: Input 123 03 Output Program 03 cannot be cancelled. Input 123 02 Output Subscription to 02 has been removed. Welcome! 01: create an account 02: join membership 03: remove membership 04: payment 05: delete account 06: access to account // if entered 04, this must be printed Member ID, subscription : Input 123 03 Output Payment has been made. Thank you. Welcome! 01: create an account 02: join membership 03: remove membership 04: payment 05: delete account 06: access to account Gym Membership Program: This program asks for orders from the user in number. Orders include creating a profile (1), subscribing to a membership (2), removing membership (3), making a payment (4), deleting member account (5) and access to member's profile (6). When asking to create a new profile, the program asks for the member's name, age and ID as an input to store the information. With the ID created, the member can continue using other functions of the program such as subscribing to a membership. Memberships offered by the gym include Access to the gym annual ($600), Access to the gym monthly ($80), Special Programs (Hot yoga and Pilates) which are $250 each for a 4 weeks program. For special programs such as Hot Yoga and Pilates, there are three instructors available for each program with five spots per instructor for each program. Members can choose their own instructor as long as spots are available. Members can cancel their subscription for annual and monthly access to the gym, but special programs are non-refundable thus cancellation is not eligible. In order to delete their profile, there must be a payment made before for all of their subscriptions. The program will ask the user to make a payment first when there are any unpaid fees, to delete their account. The user can have access to the member's profile anytime with the member's ID, which prints the name, age, ID, subscriptions, and payment status of the member

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

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

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

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

Get Started

Recommended Textbook for

MongoDB Applied Design Patterns Practical Use Cases With The Leading NoSQL Database

Authors: Rick Copeland

1st Edition

1449340040, 978-1449340049

More Books

Students also viewed these Databases questions