Clarissa M.

asked • 08/15/21

JAVA HELP ASAP!!

Write a program that continues to ask to enter a passcode and compares it with a predetermined 4 digit integer:

a) prompts the user to enter a # and checks every digit one by one. If the user enters an alphabet character instead of a digit, the program captures the InputMismatchException, and the process starts again from (a)

b) After the user enters all 4 digits, the program compares the resulting number to the passcode. If they don't match, the program throws its own RuntimeException and the process starts again from (a)

c) if not, the program terminates

1 Expert Answer

By:

Patrick B. answered • 08/15/21

Tutor
4.7 (31)

Math and computer tutor/teacher

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.