Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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

Step: 3

blur-text-image

Ace Your Homework with AI

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

Get Started

Students also viewed these Databases questions