Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Can you do this in java please thank you Write a Java program that will play a number guessing game. The program should allow a

Can you do this in java please thank you
image text in transcribed
Write a Java program that will play a number guessing game. The program should allow a user to enter 3 different numbers between 1 10 (inclusive). You must store the 3 numbers in a 1-Dimensional array. Your program must use one class and include several class methods to implement several tasks. Each task should be implemented by a separate method. Display a simple menu screen showing the following options (each must be implemented in a separate method) 1. Enter 3 different numbers between 1-10 (inclusive). 2. Display the contents of the 1-D array containing the 3 numbers that you entered. 3. Sort the contents of the array in increasing order (i.e. 1st element smallest number, 2nd element- 2nd smallest number, etc.). Compare your 3 numbers in the 1-D array with the following numbers to see if they are the same and display the result 4. 2, 4, 6 e.g., your program might display: You entered 1, 2, 3 You match one number. It is 2 5. Display the most common number entered during the program execution 6. End program Note: After a method has completed, your program should return to the main menu and allow the user to select another option. Note: Extra marks will be awarded for good comments, indentation and layout of code. *Program must keep running until user choose to terminate it and there must be at least 5 different methods

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions