A retail store has a preferred customer plan where customer can earn discounts o
ID: 3641200 • Letter: A
Question
A retail store has a preferred customer plan where customer can earndiscounts on all their purchases. The amount of a customers discount is
determined by the amount of the customers cumulative purchases in the
store as follows:
When a preferred customer spends $500, he or she gets a 5 percent
discount on all future purchases.
When a preferred customer spends $1000, he or she gets a 6 percent
discount on all future purchases.
When a preferred customer spends $1500, he or she gets a 7 percent
discount on all future purchases.
When a preferred customer spends $2000, he or she gets a 10 percent
discount on all future purchases.
Design a class named PreferredCustomer, which extends the
Customer class. The PreferredCustomer class should have fields for
the amount of the customers purchases and the customers discount level.
Write one or more constructors and the appropriate mutator and accessor
methods for the classs fields.
Explanation / Answer
setPurchases public void setPurchases(double p) setPurchases method getPurchases public double getPurchases() getPurchases method getDiscountLevel public double getDiscountLevel() getDiscountLevel method
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.