Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Guess-the-Number Game Expanded Write an app that plays guess the number as follows: The app will play the game itself. It will choose a random

Guess-the-Number Game Expanded

Write an app that plays guess the number as follows:

The app will play the game itself. It will choose a random number between 1 and 100, then it will try to guess the number using an algorithm you write.

Rules

1.The random number generator will be enclosed in its own class. A constructor will generate the private random number upon object instantiation. The class must have at least a get property so the random number can be retrieved. But do not assign the value to a variable outside its class. Feel free to use a struct instead of a class if you want.

2.A method will hold the algorithm for guessing the number. Use an array to track all the guessed numbers. Allow only 10 attempts, so the array needs to be 10 elements.

3.Upon completion, display the random and each array element sequentially (to show the guesses).

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

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

Recommended Textbook for

JDBC Database Programming With J2ee

Authors: Art Taylor

1st Edition

0130453234, 978-0130453235

More Books

Students also viewed these Databases questions

Question

5. Discuss the key components of behavior modeling training.

Answered: 1 week ago

Question

4. Develop a self-directed learning module.

Answered: 1 week ago

Question

2. Provide recommendations for effective on-the-job training.

Answered: 1 week ago