Question: Imagine a program that displays a menu of five possible choices, lettered a through e. Suppose the users selection is read into the character variable
Imagine a program that displays a menu of five possible choices, lettered a through e. Suppose the user’s selection is read into the character variable choice. Write a switch statement that reacts to this choice by displaying a message that indicates the choice. Display an error message if the user makes an invalid choice.
Step by Step Solution
3.51 Rating (174 Votes )
There are 3 Steps involved in it
Scanner keyboard new ScannerSystemin SystemoutprintlnEnter a letter a e inclusively Strin... View full answer
Get step-by-step solutions from verified subject matter experts
