Question: In this lab, you complete a partially pre - written Java program that includes a function with no parameters. The program asks the user if
In this lab, you complete a partially prewritten Java 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 named discount that displays the message "You are preregistered and qualify for a discount." If the user has not preregistered, the program should call a function named noDiscount that displays the message "Sorry, you did not preregister and do not qualify for a discount."
The source code file provided for this lab includes the necessary variable declarations and input statement. Comments are included in the file to help you write the remainder of the program.
ArtShow.java 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.
import javax.swing.;
public class ArtShow
public static void mainString args
String registerString;
registerString JOptionPane.showInputDialogDid you preregister? Enter Y or N: ;
Test input here. If Y call discount else call noDiscount
End of main method.
Write discount method here.
Write noDiscount method here.
End of ArtShow class.
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
