Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

IMPORTANT: PLEASE FOLLOW THE ASSESSMENT CRITERIA AND USE METHODS Write a program in Java to develop Spin the Wheel game. Your program should allow two

IMPORTANT: PLEASE FOLLOW THE ASSESSMENT CRITERIA AND USE METHODS

Write a program in Java to develop Spin the Wheel game. Your program should allow two players to play the game. Each player has four turns to spin the wheel and get points. The wheel is divided into five sectors as follows:

1- Lose a Turn: the player will lose their turn and will not earn any point

2- Guess a prime: an integer between 10 and 50 is generated randomly, and the player should guess if the generated number is a prime number. A number is prime, if it is evenly divisible by 1 and itself. The player earns 5 points if the answer is correct.

3- Earn 5 points: the player earns 5 points

4- Guess a Leap Year: the program generates randomly a year between 1900 and 2050. The player should guess whether the generated year is a leap year. The year is a leap if evenly divisible by four and by 100 or 400.The player earns 15 points if the answer is correct.

5- Guess missing Letters: a word with three missing letters is displayed to the player. The player guesses the missing letters one letter at a time. The player earns 20 points if they guess the three letters (the player should guess all the three missing letters to get the points). Use array of String to save a list of words of your choice and select randomly a word from the list. Your program should ask the players if they would like to play again at the end of the game using Yes/No question.

Assessment

This assignment is out of 100. Your program should be free of syntax errors to be graded.

- Using meaningful variable names. (5 points) - Adding enough comments to understand the program. (5 points)

- Using indentation properly. (5 points)

- Dividing the program into methods which covers the program requirements. Each method does one task. (70 points)

- Allowing the players to play the game again (5 points) - Main method that calls the other methods. (10 points

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

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

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

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

Get Started

Students also viewed these Databases questions