Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a program that presents the user with 6 menu choices. If the user enters a zero, the program terminates. If the user enters a

Write a program that presents the user with 6 menu choices.

image text in transcribed

If the user enters a zero, the program terminates. If the user enters a one, the program displays a message (such as "You selected Option 1") and then the program waits for the user to press a key and enter.

image text in transcribed

After the user presses a key and enter the main 6 options are displayed again. Options 1 to 5 will work the same as option 1.

Hint - the main loop should be

 do { System.out.println(prompt); System.out.println("Enter a number from 0 to " + 5 + " : "); option = input.nextInt(); // bunch of if statements and/or switch statement } while (option >= 1 && option  

Java language

[@] to Exit [1] Option 1 [2] Option 2 [3] Option 3 [4] Option 4 [5] Option 5 Enter a number from 0 to 5: You selected option 1 Press any key and then enter to continue

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

Time Series Databases New Ways To Store And Access Data

Authors: Ted Dunning, Ellen Friedman

1st Edition

1491914726, 978-1491914724

More Books

Students also viewed these Databases questions