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

  Determine values of the side of triangle

Enter 3 integers and determine if these 3 values make up the sides of a triangle. If any side is

  It inherits the functionality of super class

It inherits the functionality of super class Package and contains an additional data member representing an additional fee per ounce charged for overnight-delivery service.

  Create a calculator function

This is the code for my trip planner,you need to figure out how to create a calculator function to enable users to calculate their own costs if they choose

  Write a program that ask the user to enter a usemame

Write a program usennuftevalidator.java that ask the user to enter a usemame and checks whether the usemame meets the following criteria

  Develop a web-based application the server-side part of

develop a web-based application. the server-side part of the application must be developed using java servlets

  In this project you need to write a program called gf2java

in this project you need to write a program called gf2.java to implement the finite field gfpnwhere p is a prime number

  Program that allows users to enter a dollar amount

Write a program that allows users to enter a dollar amount for their bank account balance at the beginning of the month. Then ask the user to enter a dollar amount for any number of checks written in a month, up to 50.

  Implement a class person with two fields name

Implement a class Person with two fields name and age, and a class Car with three fields - implement a class that saves the details of the person.

  Design into java code

As a design activity- the class diagram from a set of classes which form the basis for a simple project management tool. Your design should have the following classes: Employee Class, Project Class, Consultant Class, Manager Class, theAssignment Clas..

  Determines if the input string is a valid lock combination

Write a Java program that satisfies the given requirement - Prompts the user to input exactly nine characters, which constitute a valid lock combination.

  Prepare a java program to random pick

The user and computer will each randomly pick one and common rules of winning apply. The game ends when the user and computer pick the same item.

  Details about the consultants and projects

A consulting firm maintains a database of its employees (a number of consultants) and a list of projects it has accomplished, has been developing, and is about to start. Details about the consultants and projects are given below:

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