Enum In your code, create an enum with 5 options. Then create an array with 5 strings. Each string is a message to show the user the response to each enum the user entered. Take text input from the user that must be one of the enums. Find the variable integer to the enum that the user entered. Then use the variable to do a lookup in the tuple in order to output the appropriate response.

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter8: Arrays
Section: Chapter Questions
Problem 9PE
icon
Related questions
Question
Enum
In your code, create an enum with 5 options.
Then create an array with 5 strings.
Each string is a message to show the user the response to each enum the user entered.
Take text input from the user that must be one of the enums.
Find the variable integer to the enum that the user entered.
Then use the variable to do a lookup in the tuple in order to output the appropriate response.
Transcribed Image Text:Enum In your code, create an enum with 5 options. Then create an array with 5 strings. Each string is a message to show the user the response to each enum the user entered. Take text input from the user that must be one of the enums. Find the variable integer to the enum that the user entered. Then use the variable to do a lookup in the tuple in order to output the appropriate response.
Expert Solution
steps

Step by step

Solved in 4 steps with 3 images

Blurred answer
Knowledge Booster
Array
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning