Computers and Technology
Computers and Technology, 06.12.2020 14:00, reycaden

We want to create a simple game in which 10 random numbers having an integer value between 0 and 34 must be generated and stored inside an array. The player (user) has to enter a sequence of integer
values up to 30 at maximum in order to guess any subset of the randomly generated numbers.
The player should not repeat the same number twice, otherwise he will lose the game and his data entry
has to be stopped and the current score -1 has to be given for him.
The score is calculated as 1 point for each guessed, if the guessed random number is generated twice
inside the array an additional point has to be added to the score, if 3 times – 3 points… The score has to
be displayed for the player at the end of the game.
To simplify the writing of the game’s program, decompose your code as advised below:
- Use an array of integers to store the values entered by the user to check for repeated values.
- Write a Boolean method which receives in parameters a partially filled array of integers, the
current size of the array (number of filled values) and an integer value. The method has to
search if the given last parameter value is existing inside the array.
- You can use any additional method

answer
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 17:00, joshualoz5414
Acase study allows a more detailed look at the life of a single subject than any other study.
Answers: 3
image
Computers and Technology, 22.06.2019 22:20, kaiyerecampbell95
Pp 4.1 design and implement a class called sphere that contains instance data that represents the sphere’s diameter. define the sphere constructor to accept and initialize the diameter and include getter and setter methods for the diameter. include methods that calculate and return the volume and surface area of the sphere (see pp 3.5 for the formulas). include a tostring method that returns a one-line description of the sphere. create a driver class called multisphere, whose main method instantiates and updates several sphere objects.
Answers: 1
image
Computers and Technology, 23.06.2019 16:30, saintsfan2004
How to do this programming flowchart?
Answers: 3
image
Computers and Technology, 24.06.2019 02:10, trint5952
Aspeed limit sign that says "night" indicates the legal speed between sunset and sunrise.
Answers: 2
Do you know the correct answer?
We want to create a simple game in which 10 random numbers having an integer value between 0 and 34...

Questions in other subjects:

Konu
Computers and Technology, 11.11.2020 06:10