Enum Switch Shipping Cost
mediumQuestion 156Use an enum and a switch statement to determine and print a shipping cost based on the selected method.
The enum Shipping is already defined. Set the method to EXPRESS, then write a switch statement to assign costs: STANDARD = 5, EXPRESS = 15, OVERNIGHT = 25. In a switch on an enum, write case EXPRESS: not case Shipping.EXPRESS:
Expected output
Cost: 15= newline. The output ends with a newline, so print one after the last line.
Hints4 available
Sign in to use hintsTopics
Miscellaneous
1
Tab to indent (Esc then Tab to move on) · Ctrl+Enter to run · Shift+Alt+F to format · Ctrl+Space to expand shortcuts (sysout, psvm, fori)
Your output
Run your code to see the output here...
Test cases
Run your code to see test case results.