CJCoding With Joseph
15per day

Enum from int with helper method

Complete the static fromScore() method that maps an integer to a Rank enum constant, then read a score and print the result.

Expected Output:
Rank: SILVER

In fromScore(): return BRONZE if score < 50, SILVER if score < 80, GOLD otherwise. This pattern centralizes enum-mapping logic in a single reusable method.

⚠️ AUTO-INPUT MODE: The input stream will automatically contain '72\n'. Use Scanner's nextInt() to read it.

Expected Output:

Rank: SILVER
Topics:
Miscellaneous
📥 Auto-Input:
72\n
This input is automatically fed to your program's stdin
Code Editor
1
Tab to indent · Ctrl+Enter to run · 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.