Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write a class, ConsumersCls. The class contains two attributes ( consumerID and a purchase amount ) . The class must have a twoparameter constructor and
Write a class, ConsumersCls. The class contains two attributes consumerID and a purchase amount The class must have a twoparameter constructor and member functions such as get and set member functions and a member function calculate The calculate function is used to calculate a discount amount in dollars based on the conditions below. Implement the class and the main function. Logic for the Calculate function to calculate the discount amount: If the purchase amount is between $$ the discount rate is
If the sales amount is between $$ the discount rate is
If the sales amount is between $$ the discount rate is
If the sales amount is greater than $ the discount rate is
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started