A statement telling the user if they get a discount or not

Assignment Help JAVA Programming
Reference no: EM13940388

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.

Reference no: EM13940388

Questions Cloud

Describe the major stakeholders of your chosen organization : Write a paper of 700- to 1,050- words explaining the roles and responsibilities of the controller for the financial function of the organization. Describe the major stakeholders of your chosen organization
Victim of the slippery slope phenomenon : 1. Psychologist Dan Ariely says that "the first dishonest act is the most important one to prevent." Why does he say that? Do you agree? 2. Can you think of a situation where you were a victim of the slippery slope phenomenon?
How does leverage affect the cost of equity : In perfect capital markets, how does the choice of leverage impact firm value? Which of the following is true about agency considerations in finding the optimal capital structure for a firm? In perfect capital markets, how does leverage affect the co..
Analyse the australian container and freight services : You need to analyse the companys ACFS - Australian container and freight services current logistics management related to a current issue facing logistics management in Australia today.
A statement telling the user if they get a discount or not : 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.
Motivate staff through formal appraisal of performance : Explain how you as a manger can motivate staff through this formal appraisal of performance and how self- appraisal by the staff member can also motivate future performance
Expects to generate net income : Nielson expects to generate net income of $20 million over the next year. Currently Nielson has 8 million shares outstanding and its stock is trading at $20.00 per share. Nielson's EPS is closest to __________.
What is the implied value of the firm growth : What is the stock selling for?  If earnings are $3.10 a share, what is the implied value of the firm's growth opportunities?
What is the cost formula for monthly shipping cost : Suppose a company finds that shipping cost is $3,560 each month plus $6.70 per package shipped. What is the cost formula for monthly shipping cost?

Reviews

Write a Review

JAVA Programming Questions & Answers

  Using a linked implementation of graph write a method

Write a method that takes two nodes as input and returns true if joining an edge between these two nodes, forms a duplicate path to one of the input nodes within the graph.

  What is the output of the following program

How can you tell whether an exception is checked or unchecked? What is required of checked exceptions that is not required of those that are unchecked? What is the output of the following program

  Follow the projects suggestion

Be sure that you follow the projects suggestion and create a separate class for the word analysis. An instance of this class and its methods should then be called by your GUI interface.

  Create a table that depicts the runtime for arrays

Create a table that depicts the runtime for arrays of length 1 to 10. Would you expect the general runtime to be O(n), O(n2), O(n3), or some other function of n? Explain

  Development of database systems

Prior to the development of database systems, file I/O was how information was stored and retrieved. Give your opinion on what you believe we have gained by using databases. Explain whether or not you believe files had any advantages.

  Implement simple java program to input syllabus grades

To implement simple Java program to input (hypothetical) syllabus grades, computing and displaying both normal Mean and Harmonic Mean.

  Algorithm into a java program

Based on the feedback received for Question 3 in Assignment 1, transform your algorithm into a JAVA program. Your code should contain appropriate validations and must focus on code optimization.

  Object from question 1 manage its display

Write a Java statement to have the object from question 1 manage its display area by dividing it into 3 rows which have 4 columns each.

  Write a program that enables elevator-nxtrobot to be control

Write a program that enables theElevator-NXTrobot to be controlled manually using the NXT's front panel buttons (LEFT for door open, RIGHT for door close, ENTER for up, and ESCAPE for down), as demonstrated in thisvideo.

  Java program that can be used to read a list of values

Java program that can be used to read a list of values from the standard input and display the following information based on the values read: 1. All of the positive numbers and the count. 2. All of the negative numbers and the count.

  Prepare a java application will read the database file

Prepare a java application will read the database file. The path of the database file will be supplied by a run-time parameter. If the database file does not exist, the user will be told the database does not exist.

  Develop parent lock method asks for four digit password

Develop the parent lock method (turns lock on/off) which asks for 4 digit password. Navigating to any channel which is in range 99-110 must ask for password when parent lock is on.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd