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

  Recursive factorial program

Write a class Array that encapsulates an array and provides bounds-checked access. Create a recursive factorial program that prompts the user for an integer N and writes out a series of equations representing the calculation of N!.

  Hunt the wumpus game

Reprot on Hunt the Wumpus Game has Source Code listing, screen captures and UML design here and also, may include Javadoc source here.

  Create a gui interface

Create GUI Interface in java programing with these function: Sort by last name and print all employees info, Sort by job title and print all employees info, Sort by weekly salary and print all employees info, search by job title and print that emp..

  Plot pois on a graph

Write a JAVA program that would get the locations of all the POIs from the file and plot them on a map.

  Write a university grading system in java

University grading system maintains number of tables to store, retrieve and manipulate student marks. Write a JAVA program that would simulate a number of cars.

  Wolves and sheep: design a game

This project is designed a game in java. you choose whether you'd like to write a wolf or a sheep agent. Then, you are assigned to either a "sheep" or a "wolf" team.

  Build a graphical user interface for displaying the image

Build a graphical user interface for displaying the image groups (= cluster) in JMJRST. Design and implement using a Swing interface.

  Determine the day of the week for new year''s day

This assignment contains a java project. Project evaluates the day of the week for New Year's Day.

  Write a java windowed application

Write a Java windowed application to do online quiz on general knowledge and the application also displays the quiz result.

  Input pairs of natural numbers

Java program to input pairs of natural numbers.

  Create classes implement java interface

Interface that contains a generic type. Create two classes that implement this interface.

  Java class, array, link list , generic class

These 14 questions covers java class, Array, link list , generic class.

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