Programming Language Java Retail Store Preferred Customer Plan Customers Earn Discounts Pu Q43778410
PROGRAMMING LANGUAGE: Java
A retail store has a preferred customer plan where customers canearn discounts on all their purchases. The amount of discountdepends on customer’s cumulative purchases in the store and thebusiness rules for discounts is as follows:
- • When a preferred customer spends $500, he or she gets a 5 %discount on all future purchases.
- • When a preferred customer spends $1000, he or she gets a 6 %discount on all future purchases.
- • When a preferred customer spends $1500, he or she gets a 7 %discount on all future purchases.
- • When a preferred customer spends $2000, he or she gets a 10 %discount on all future purchases.
Design a class called PreferredCustomer, which is derived fromthe Customer class you created in No 3. The PreferredCustomer classshould have properties for the amount of the customer’s purchasesand the customer’s discount level. Demonstrate the class in asimple GUI application.
- Write the code include appropriate input validation, error andexception handling code.
- Test Plans
Expert Answer
Answer to PROGRAMMING LANGUAGE: Java A retail store has a preferred customer plan where customers can earn discounts on all their …
OR