Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Write a program using CASE \"SWITCH\" STATEMENTS for four enumerators. Initializ

ID: 3538871 • Letter: W

Question

Write a program using CASE "SWITCH" STATEMENTS for four enumerators. Initialize each as follows:

1. first, second, third, fourth, fifth, sixth, seventh, eighth, ninth

2. Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday

3. curve, fast, knuckle, slider

4. single, double, triple, homer


The program should prompt a user to input a character array or 4 numbers pertaining to each

enumerator. Display help text to assists the user. The help text should display the smallest

and largest possible values for each inputted number. Validate the input. Display an error

message for a number entered outside the range of the enumerator.

Using the enumerators, generate a sentence that will display as follows:

In the fifth inning on Saturday, I hit a fast ball for a triple. ;

where (fifth, Saturday, fast and triple) are printed using the input generated from their

respective enumerators.


The input that produced the statement above would be: 4612

The program should loop allowing the user to decide whether or not he or she wishes to

process the loop again.

Explanation / Answer

http://docs.oracle.com/javase/tutorial/java/nutsandbolts/switch.html

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote