Answered step by step
Verified Expert Solution
Question
1 Approved Answer
I need help with making this game using java - Project 2: Memory Game NOTE: If you turn in a solution to this problem based
I need help with making this game using java -
Project 2: Memory Game NOTE: If you turn in a solution to this problem based on something from a pay-for-answers website such as Chegg, CourseHero, etc., you will receive an F in this course (not just on this assignment). Start early and seek help from a lab assistant, the help room, or your professor if you need it. If you don't have time to do that, it is better to get a low grade on the project than to cheat and fail the course. This program is a simple memory game. The requirements are as follows: - Show the user three unique random numbers between 1 and 100, inclusive. Unique means that, for example, it should not be possible for two of the random numbers to both be 27 . - Wait three seconds - Clear the screen by writing out 100 blank lines - Ask the user to answer a question about the numbers. The possible questions are "what is the smallest number?", "what is the largest number?", "what is the median number?" (median means the one in the middle, value-wise), and "what is the sum of all the numbers?" Your program should choose randomly among these questions for each round. - Each time the user answers, tell them if they were correct or not. If they were incorrect, tell them what the right answer was. - Repeat all of the above steps ten times, and then tell the user their overall score. Here is code to pause your program for three seconds: // Wait three seconds try \{ Thread.sleep(3000); \} catch (InterruptedException e) \{ e.printStackTrace(); \} Example: (Note that the blank lines are not shown in this example, but should be in your program.) > java Main The numbers for this round are: 1979100 What was the smallest number? 19 That's right! The numbers for this round are: 916861 What was the sum of all the numbers? 220 That's right! The numbers for this round are: 689835 What was the median number? 68 That's right! The numbers for this round are: 603037 What was the largest number? 60 That's right! The numbers for this round are: 128266 What was the sum of all the numbers? 160 That's right! The numbers for this round are: 534067 What was the sum of all the numbers? 160 That's right! The numbers for this round are: 816194 What was the median number? 81 That's right! The numbers for this round are: 548180 What was the smallest number? 7 That's wrong. The correct answer was 54 The numbers for this round are: 23965 What was the smallest number? 1 That's wrong. The correct answer was 9 The numbers for this round are: 375771 What was the sum of all the numbers? 1 That's wrong. The correct answer was 165 You got 7 out of 10 right. Rubric: Note: Code that does not compile will receive a zero. [15 pts] Generates three unique random numbers between 1 and 100 inclusive [5 pts] Randomly chooses the question type (smallest, largest, median, or sum) and prompts the user [15 pts each x 4 question types =60 pts] Determines the correct answer for each question type [5 pts] Correctly determines if the user provided the right answer and notifies them accordingly [5 pts] The game lasts ten rounds, and the overall score is reported accurately [10 pts] The program is clearly organized, commented, and follows standard coding practices, including using descriptive/meaningful variable and class names
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started