Create a program that asks a player to guess a number

Assignment Help JAVA Programming
Reference no: EM131267326

1. Create a program that asks a player to guess a number, the application generates a random number, display a message indicating whether the player's guess was correct, too high, or too low. Add a loop that continuously prompts the user for the number, indicating whether the guess is high or low, until the user enters the correct value. After the user correctly guesses the number, display a count of the number of attempt it took. Enhance the game so the player has to pick a number between 1 and 1,000. Once the player has figured out the corret number, ask if they would like to play again using the Scanner class. If yes, restart the game with a new random number. If not, use the System.out.printIn(); method to display a message that thanks the user for playing the game. Save the file as RandomGuess3.java

2. The following are serviced offered by a hair salon, including it's prices and times: Cut - $8 - 15 minutes, Shampoo - $4 - 10 minutes, Manicure - $18 - 30 minutes, Style - $48 - 55 minutes, Permanent - $18 - 35 minutes, Trim - $6 - 5 minutes. Create a class that holds the service description, price, and the number of minutes it takes to perform the service. Include a constructor that requires arguments for all three data fields and three get methods that each return one of the data field's values. Save the class as Service.java

Also, write an application named SalonReport that contains an array to hold six Service objects, and fill it with the data from the Service class. Include methods to sort the array in ascending order by each of the data fields. Prompt the user for the preferred sort order, and display the list of services in the requested order. Enhance the program by displaying a menu that asks the user how they want to sort the services menu. 1) Sort by Service Description, 2) Sort by Price, 3) Sort by Time (Minutes), or 0) to Exit. Add a do...while () loop that keeps prompting the user for the next preffered sort order until the user finally chooses "0" to exit. Save the program as SalonReport.java

Reference no: EM131267326

Questions Cloud

How many ways can zapdata benefit salespeople : List the steps in the selling process.- What does sales follow-up entail? Why is it an essential step in the selling process, particularly from the perspective of relationship selling?
How the balanced scorecard with help management : Describe how the balanced scorecard with help management to identify information requirements. Discuss the IS system that you would recommend for management to use to obtain this information for each scorecard component. Remember to provide rationale..
Accounting-finance and engineering departments : You have been asked by the CIO to create a Microsoft® PowerPoint® training presentation along with an accompanying summary guide handout for new employees in the IT, Accounting/Finance, and Engineering departments.
Prepare a memorandum and analyze the legal issues : The State prosecuted Smith for drunk driving, possession of cocaine, murder, and two counts of possession of a handgun by a felon. Prepare a memorandum and analyze the legal issues presented by Mr. Smith's case.
Create a program that asks a player to guess a number : Create a program that asks a player to guess a number, the application generates a random number, display a message indicating whether the player's guess was correct, too high, or too low.
Methods of online communication among terrorists : After reading this week chapters, answer all of the following Discussion Questions: 1. List and describe the methods of online communication among terrorists.
Design the frp for a simply supported beam with length l : Design the FRP for a simply supported beam with length L = 7 m.
Briefly discuss the ethics of product safety : Identify and describe corporations' duties toward their consumers and consumers' related rights. "Advertising is good for businesses and consumers."  Do you agree with this statement?  Explain. Describe two controversial issues in advertising
Discuss how identity interacts with discourse : Discuss how identity interacts with discourse. Now it's your turn to write an exploration of how discourse interacts with your own identity.

Reviews

Write a Review

JAVA Programming Questions & Answers

  Create a road class

Create a Road class. The class should have functions for setting the width of the road in feet and the length of the road in miles. It should also have functions for obtaining the width of the road the length of the road.

  Design a program that asks the user to enter a series of 20

Number Analysis Program: Design a program that asks the user to enter a series of 20 numbers

  Write a method to save a linked list to a text file

Write a method to save a Linked List to a text file called file.txt. It must save the Linked List to the file with each node on a different line.

  Designing an application utilizing event-driven programming

Designing an application utilizing event-driven programming - the Model-View-Controller design pattern - You can review the code of the program "Puzzler" seen in lab 4 to help you with the class DotButton.

  Implement a shopping cart class with user interface

project will be to implement a shopping cart class with user interface (UI) that contains main() in Net Beans. The UI class will be used to perform user input/output and to invoke the appropriate methods of shopping cart class. When your program star..

  Programing of tree java

The listing of Tree.java is supplied below as a starting point for this lab. A picture of Tree.java output is also shown. Either cut/paste the code or type it in. Run the program to verify that it works. Study the listing until you understand comp..

  Create a console-based program and a gui application

Create a console-based program and a GUI application, which justifies the following conditions: The Main() method prompts the user for an integer value and, in turn.

  How is the location of the click point determined

When a mouse event is generated how is the location of the click point determined?

  Implement the nested loops

The user has also already entered a mystery number they want the following series to calculate based upon their current numbers (also relatively logical in size).

  User to input a decimal number and ouputs the number

Write a program that prompts the user to input a decimal number and ouputs the number rounded to the nearest integer.Remember the rules around proper development style and form, including adding comments. A software developer should always add commen..

  Program that computes and prints the value of 6!/5! using

Write a Java program that computes and prints the  value of 6!/5! using Scanner.

  Break ties by comparing x-comparing x-coordinate values

(Book is Building Java Programs 3rd edition) modify the Point class from chapter 8 so that it defines a natural ordering by implementing the Comparable interface. Compare the Points by y-major order; that is, points with smaller y-coordinate values s..

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