I need helping figuring this lab exercise.
Writing Methods with No Parameters
The program asks the user if they have pre-registered for a conference. If the user has pre-registered, the program should call a method named discount () that displays the message "You are pre-registered and qualify for a 10% discount." If the user has not pre-registered, the program should call a method named noDiscount () that displays the message "Sorry, you did not pre-register and do not qualify for a 10% discount."
I need help writing the Java Statements.
// ConferenceDiscount.java - This program determines if a conference attendee gets a 10% discount
// for pre-registering.
// Input: Interactive.
// Output: A statement telling the user if they get a discount or no discount.
importjavax.swing.*;
publicclassConferenceDiscount
{
publicstaticvoid main(String args[])
{
String registerString;
registerString = JOptionPane.showInputDialog("Did you pre-register? 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 ConferenceDiscount class.