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

  In this project you will simulate some people catching fish

in this project you will simulate some people catching fish in a lake. the purpose of the assignment is to get used to

  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..

  Rebalancing a binary search tree

Your task is to write a class RebalancingTree that extends the attached BST class. You should override the insert method in BST. Your overriding method should first call the method it is overriding

  Requests 2 numbers from the user and then passes

Write a program in java that requests 2 numbers from the user and then passes these 2 numbers to a method findMax that displays the largest number. Make sure your method is called fron main(). Test the method by passing various data to it

  Trying to write it java first and then pseudo code

A popular diversion in the United States, "word find" (or "word search") puzzles ask the player to find each of a given set of words in a square table filled with single letters. Trying to write it java first and then pseudo code

  The string class and/or the stringbuffer class in java

Create a simple Java application that uses the String class and/or the StringBuffer class and at least 4 of the class methods. Show the code, demonstrate it works properly and describe what it is doing.

  Create a new project called fractions

You are going to write an API for a Fractions class. It will accept fractions as input and perform various mathematical operations on them -  Create a new project called Fractions. Within Fractions, create a new class called Fraction. NetBeans will..

  Write an enhanced for loop that iterates over each student

Calculates the tuition for each student. Write an enhanced for loop that iterates over each Student in. pStudentList. For each Student, call calcTuition() on that Student. Note: this is a polymorphic method

  Write a piece of code that prints the values

Write a piece of code that prints the values requested in each part, given these variables:

  Java code that needs to be coded-complex number class

Just a Java Code that needs to be coded. Your given the design, just needs the methods and such to be fixed. This is for a Complex Number class.

  Write a main method that reads in a single string

Write a main method that reads in a single string and calls trianglePrint with that string. Write a method that uses recursion to print an input string in the shape of a triangle

  Write the classic arcade game of breakout

For each instance variable in your program, explain why you chose to make it an instance variable rather than a local variable - How did you test whether the game would end correctly in this second case? Did you make any changes to the code when test..

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