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

  Write a script that reads a four-digit integer

Write a script that reads a four-digit integer entered by the user in a prompt dialog and encrypt it as follows: Replace each digit by (the sum of that digit plus 7) modulus 10.

  Prepare a java simulation program

Given a hash function h, prepare a java simulation program to determine each of the subsequent quantities after 0.8*tablesize random keys have been generated. The keys should be random integers.

  Create an interface called player

Create an interface called Player. The interface has an abstract method called play() that shows a message describing the meaning of "play" to the class.

  Create floating point arrays

Create floating point arrays each with three elements - Ask the user to give input for the two arrays.

  Become the leading coffee shop in arlington and to be the

primarily my project involves theestablishing of a javanet cafeacute where customers would enjoy coffee as they connect

  Write a java program that will read a sequence of names

Write a java program that will read a sequence of names (first name followed by last name, separated by at least one space) from a text file and will 1) remove all duplicate names and 2) write the names (last name followed by a comma, followed by one..

  Write a java program that simulate a number of stopwatches

Write a JAVA program that would simulate a number of stopwatches (e.g. 4 stopwatches) times using the concept of Multithreading. The time of stopwatches increase on their own. Moreover, a stopwatch's time can be increased and decreased using speci..

  Write a one-class java program

Write a one-class Java program with at least one method (besides main) to determine if the data in your dataset (i.e., in data.txt) follows Benford's law.

  Write a program to play a game of craps

Write a program to play a game of "craps," a dice game popular in casinos. Here are the rules - Use functions appropriately. The program should allow the user to play another round.

  Write a program with an exception handler

Write a program with an exception handler that deals with nonnumeric operands; then write another program without using an exception handler to achieve the same objective.

  Implementing a binary tree write a generic implementation

Implementing a Binary Tree Write a generic implementation of a binary tree class using an internal node class TreeBinUMUC and NodeTreeBin

  Your task in this assignment is to develop a graphical user

your task in this assignment is to develop a graphical user interface based java program that can communicate with a

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