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
Bronze tier is awarded between cups and
Silver tier is awarded between cups and
Gold tier is awarded between and
Platinum tier is awarded over cups.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
