Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ App Description: The name of the game is Codecracker, and heres how it works: the program generates a random 5-digit number or code (the

C++ App Description:

The name of the game is Codecracker, and heres how it works: the program generates a random 5-digit number or code (the size of the code can be made larger or smaller to change difficulty), and your goal is to try and figure out what the code is. The person playing the game will enter a 5-digit number, and the program will tell them the following things: a) If a digit is correct and in the right place. b) If a digit is correct, but in the wrong spot. c) If a digit is wrong all together. The player then enters another attempt, until theyve either run out of attempts, or theyve cracked the code! How we will utilize what weve learned: 1) We will use if/else statements to compare the numbers, and output feedback on the correctness of said numbers. 2) The afore mentioned if/else statement while be contained in a while loop, which will keep the game going for a set number of attempts (which can be changed, depending on the difficulty). 3) All of that will be contained in a Function, which may also contain smaller functions to carry out other tasks (such as outputting the appropriate message for the situation). 4) We will use searching and sorting to compare the numbers imputed with the numbers in the code, so that the Program can tell the User if numbers are correct but in the wrong spot (we will probably put this within its own function as well). 5) We arent sure how to save and read from files yet, but we plan on giving the User the ability to save the game, and pick up where they left off.

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

Data Access Patterns Database Interactions In Object Oriented Applications

Authors: Clifton Nock

1st Edition

0321555627, 978-0321555625

More Books

Students also viewed these Databases questions

Question

b. What roles did these ethnic groups have in the show?

Answered: 1 week ago

Question

Answered: 1 week ago

Answered: 1 week ago