(Solved) : Question 3 Payment Transaction Scenario Could Represented Following Hierarchy Payments Vis Q42719918 . . .

Question 3: The payment transaction scenario could be represented by the following hierarchy: Payments VISA MASTERCARD Paypal

(Use Java code to complete )

Question 3: The payment transaction scenario could be represented by the following hierarchy: Payments VISA MASTERCARD Paypal • Create Payments as a superclass and VISA, MASTERCARD, PAYPAL as subclasses • Create an interface Payments Interface with one method called paymentInfo. Create classes VISA, MASTERCARD, PAYPAL that implement Payments For each of the three classes (VISA, MASTERCARD, PAYPAL), create one constructor • Constructors are used to create objects with initial balance with US dollars (USD). The interface class method “paymentInfo” should be overridden in the three classes (VISA, MASTERCARD, PAYPAL) to display the initial amount of each object. The USD to CAD conversion rate is 1 USD = 1.35 CAD and the extra processing fee for VISA payment is 2%, MASTERCARD payment is 2.5%, and PayPal is 1% paymentinfo method is used to display information on the screen about the current amount in CAD. • You should use polymorphism (e.g., Payments pay1 = new VISA (100)); Create a driver class with at least three different types (VISA, MASTERCARD, PAYPAL) of payments, and display the payments information in USD and the corresponding converted amount with processing fees in CAD. Also, show the total amount of money spent in CAD for all types of payments. Show transcribed image text Question 3: The payment transaction scenario could be represented by the following hierarchy: Payments VISA MASTERCARD Paypal • Create Payments as a superclass and VISA, MASTERCARD, PAYPAL as subclasses • Create an interface Payments Interface with one method called paymentInfo. Create classes VISA, MASTERCARD, PAYPAL that implement Payments For each of the three classes (VISA, MASTERCARD, PAYPAL), create one constructor • Constructors are used to create objects with initial balance with US dollars (USD). The interface class method “paymentInfo” should be overridden in the three classes (VISA, MASTERCARD, PAYPAL) to display the initial amount of each object. The USD to CAD conversion rate is 1 USD = 1.35 CAD and the extra processing fee for VISA payment is 2%, MASTERCARD payment is 2.5%, and PayPal is 1% paymentinfo method is used to display information on the screen about the current amount in CAD. • You should use polymorphism (e.g., Payments pay1 = new VISA (100)); Create a driver class with at least three different types (VISA, MASTERCARD, PAYPAL) of payments, and display the payments information in USD and the corresponding converted amount with processing fees in CAD. Also, show the total amount of money spent in CAD for all types of payments.

Expert Answer


Answer to Question 3: The payment transaction scenario could be represented by the following hierarchy: Payments VISA MASTERCARD P…

Leave a Comment

About

We are the best freelance writing portal. Looking for online writing, editing or proofreading jobs? We have plenty of writing assignments to handle.

Quick Links

Browse Solutions

Place Order

About Us