Question: for code given below: 1. write the java statements indicated by the comments 2. compile the source code file ArtShow.java and execute // ArtShow.java -
for code given below:
1. write the java statements indicated by the comments
2. compile the source code file ArtShow.java and execute
// ArtShow.java - This program determines if an art show attendee gets a 5% 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 main(String args[]) { String registerString; registerString = JOptionPane.showInputDialog("Did you preregister? Enter Y or N: "); // Test input here. If Y, call discount(), else call noDiscount(). System.exit(0);
} // 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
Get step-by-step solutions from verified subject matter experts
