Question: Only write in Java. In a new loyalty program for a caf , customers are classified into tiers based on the number of coffee cups

Only write in Java.
In a new loyalty program for a caf, customers are classified into tiers based on the number of coffee cups they've purchased. Each tier rewards customers with different benefits.
Write an expression that evaluates the int variable coffeeCups, and prints one of the following, using the ternary operator:
"None"
"Bronze"
"Silver"
"Gold"
"Platinum"
The following values of coffeeCups define the categories:
None: if the number of coffees is less than 10.
Bronze tier is awarded between 10 cups and 19.
Silver tier is awarded between 20 cups and 29,
Gold tier is awarded between 30 and 39,
Platinum tier is awarded over 39 cups.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!