Question: JAVA PLZZZ Q2) A customer is loyal if he consumes 1000$ or more in our shop. A loyal customer deserves a cash back (Bonus) on

JAVA PLZZZJAVA PLZZZ Q2) A customer is loyal if he consumes 1000$ or

Q2) A customer is loyal if he consumes 1000$ or more in our shop. A loyal customer deserves a cash back (Bonus) on the amount that he spent as follows: Cash back 0% Amount spent O S to 999 $ 1000 $ to 1999 $ 2000 $ and more 10% 15% Write a method called getCashBack that takes as parameter the amount spent and returns the cash back amount. Write a test program (main) that reads the customer name and the amount spent by the customer and prints out if the customer is loyal or not (using the method getCashBack). Sample run 1: Enter customer name and amount spent: Fadi 2800 Fadi is a loyal customer, he spent 2800.0 $ and he will get 420.0 $ cashback Sample run 2: Enter customer name and amount spent: Samer 850 Samer is not a loyal customer, he spent only 850.0 $

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 Databases Questions!