Question: please make the program in c++ not java Assignment Description. class called ComboProgram. Finally, build an application around your ComboLock class. Add a new Java
Assignment Description. class called ComboProgram. Finally, build an application around your ComboLock class. Add a new Java 1. Using a Random object as in lecture, generate three random integers from 0 to 39. Construct a ComboLock object with those numbers. Print them out to the sceen for debugging purposes. 2. Enter a loop. Ask the user to guess three numbers to release the combo lock. After scanning the three numbers, manipulate the ComboLock object to turn right, left, then right to the requested numbers You will need to calculate the numberof tcks to turn to reach the requested numbers. (Example: if the user tries the numbers 15 10 5, then you would turnRight by 15, then turnLeft by 5, then turnRight by 35. Your program must calculate these tick amounts; the user is not responsible for knowing this information.) 3. Try to open the lock. If the user got the combination correct, print that they have won some spectacular prize of your choosing, If they were incorrect, start step 2 again. At any point, the user can choose the numbers 00 0 to quit Sample Output. Here is a sample output from Assignment #5. User input begins with "->": Random secret combination: 17 35 22) Guess thee random integers from 0 to 39: 10 11 12 Sorry that s incorrect! Guess th random tegers from 0 to 39: 17 35 22 Correct You have won an A in CSCI 133
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
