Question: COMSC 140 OBJECT ORIENTED CH RED-YELLOW-GREEN GAME Concept: Classes (50 POINTS) NAME: DATE: Use at least one user defined class in your program. Write a

 COMSC 140 OBJECT ORIENTED CH RED-YELLOW-GREEN GAME Concept: Classes (50 POINTS)

COMSC 140 OBJECT ORIENTED CH RED-YELLOW-GREEN GAME Concept: Classes (50 POINTS) NAME: DATE: Use at least one user defined class in your program. Write a program to have the computer generate a digit between 100 and 999. Then the user hen the user will try to guess the number. Every time a guess is made, the computer respond with the number of red, yellow, and green digits in the guess. A guess digit is green if the guess digit and the corresponding digit are the same. A guess digit is red if it does not correspond to any of the digits. A yellow guess is if it is a correct digit but not in the correct place. Suppose the computer's number is 123. Your output may look as follows: oss is made, the computer responds Please enter a guess? 422 You have: 2 red 1 green O yellow Enter the next guess? 459 You have: 3 red O green Oyellow Enter the next guess? 122 You have: 1 red 2 green O yellow Enter the next guess? 123 CONGRATULATIONS, YOU ARE CORRECT!!!!!!!!!!! VERIFIED BY: DATE

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!