subject

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

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 19:20
1)consider the following code snippet: #ifndef book_h#define book_hconst double max_cost = 1000.0; class book{public: book(); book(double new_cost); void set_cost(double new_cost); double get_cost() const; private: double cost; }; double calculate_terms(book bk); #endifwhich of the following is correct? a)the header file is correct as given.b)the definition of max_cost should be removed since header files should not contain constants.c)the definition of book should be removed since header files should not contain class definitions.d)the body of the calculate_terms function should be added to the header file.
Answers: 1
question
Computers and Technology, 22.06.2019 19:40
Solve the following javafx application: write a javafx application that analyzes a word. the user would type the word in a text field, and the application provides three buttons for the following: - one button, when clicked, displays the length of the word.- another button, when clicked, displays the number of vowels in the word.- another button, when clicked, displays the number of uppercase letters in the word(use the gridpane or hbox and vbox to organize the gui controls).
Answers: 1
question
Computers and Technology, 23.06.2019 13:50
Explain how email technologies enable the exchange of messages between users. find out the typical parts of an email address and explain each part.
Answers: 1
question
Computers and Technology, 23.06.2019 19:00
Acompany is hiring professionals for web designing. the firm is small with few resources. they want employees who possess problem-solving skills and can independently carry out responsibilities. which kind of employee should they select?
Answers: 2
You know the right answer?
We want to create a simple game in which 10 random numbers having an integer value between 0 and 34...
Questions
Questions on the website: 13722361