CJCoding With Joseph
15free / daySign inCreate account

Enum Switch Shipping Cost

Use 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 — print one after the last line.

Hints4 available
Topics:
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.