Answered step by step
Verified Expert Solution
Question
1 Approved Answer
i need code in c + + Given an ARRAY of BOOL where the TRUE indexes 1 indicate a PRIZE. ~ bool room [ 6
i need code in c Given an ARRAY of BOOL where the TRUE indexes indicate a PRIZE. ~ bool room; Create a game with the following rules: User is given FIVE turns to find as many prizes as they can. Users select the row and column the same way we programmed TrapFinder to create the search index. When a prize is found set the bool value to FALSE to indicate no prize in the index and increase a found counter. After every selection display to user a String message indicating "Turn : you selected index rowcolumn Prize found is false.. Total prizes found: "Turn : you selected index rowcolumn Prize found is true... Total prizes found: "Turn : you selected index rowcolumn Prize found is true... Total prizes found: "Turn : you selected index rowcolumn Prize found is false.. Total prizes found: "Turn : you selected index rowcolumn Prize found is true... Total prizes found: Use a STACK to store the user selections as a history. When the five turns are complete display how many prizes were found and give a rating such as: found ~ excellent found ~ super found ~ good found ~ sad found ~ ok found ~ try again Then print the search history back to the USER represented in the same order it was selected. SUBMIT YOUR CODE IN A JAVA file, TXT file. NO WORD DOCUMENTS or PDFs THEY WILL BE PENALIZED. GRADING RULES: YOU MUST USE the ARRAY AND the STACK AS REQUIRED instructed. ARRAY stores BOOL values must flip to when found prize as explained above STACK stores STRING of selected index, prize TF and Total found as explained above YOU MUST use a function to ask for user input. You need to use a function to display the results. And you MUST use a separate function to display HISTORY from the STACK. You must use a loop in your program to cycle through any STACKS needed. PAY ATTENTION TO DETAILS and FOLLOW ALL INSTRUCTIONS ABOVE DO NOT COPY, if everyone turns in the same implementation that is cheating. BE CAREFUL and DO NOT SHARE YOUR CODE you will get a ZERO ~ F Better to try than to fail. Partial credit is given to code. USE COMMENTS! If I do not understand it I can not give partial credit. YOU HAVE THE ENTIRE THREE HOURS to turn in your solution.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started