Question: 1 - Create class / interface that implements the classes + interface displayed in the UML displayed above exactly as specified ( same variable names,
Create classinterface that implements the classes interface displayed in the UML displayed above exactly as specified same variable names, types, Make sure to include noarg all field constructors, setters getters, as well as toString methods in each of the classes created. Please note the following:
a method calculatePaymentis implemented differently in each of the concrete classes as follows:
in class Cash it is calculated as the payment amount entered minus the discountRate percentage eg if amount is and discountRate is then payment value is
in class Check, payment is the same as the amount entered.
in class CreditCard, payment is the amount plus the chargingFee.
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
