Question: In this lab, you complete a partially pre - written C + + program that includes a function with no parameters. The program asks the
In this lab, you complete a partially prewritten C program that includes a function with no parameters.
The program asks the user if they have preregistered for art show tickets. If the user has preregistered, the program should call a function nameddiscountthat displays the messageYou are preregistered and qualify for a discount."If the user has not preregistered, the program should call a function namednoDiscountthat displays the messageSorry you did not preregister and do not qualify for a discount."
The source code file provided for this lab includes the necessary variable declarations andinputstatement Comments are included in the file to help you write the remainder of the program.
Task : Define thediscountmethod and implement the body that displays the messageYou are preregistered and qualify for a discount.".
Define thenoDiscountmethod and implement the body that displays the messageSorry you did not preregister and do not qualify for a discount.".
TheArtShowDiscountprogram compiles and works as expected.
ArtShowDiscount.cpp This program determines if an art show attendee gets a discount for preregistering.
Input: Interactive
Output: A statement telling the user if they get a discount or no discount.
#include
#include
using namespace std;
void discount;
void noDiscount;
int main
string registerString;
cout "Did you preregister? Enter Y or N: ;
cin registerString;
Test here. If Y call discount else call noDiscount
return ;
End of main function
Write discount function here
Write noDiscount function here
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
