Question: Create a class named Customer that will determine the monthly repayment amount due by a customer for a product bought on credit. The class

Create a class named Customer that will determine the monthly repayment amount 

media%2F28b%2F28bca16b-bd27-491f-b68e-57

media%2Ff8e%2Ff8e553c4-1857-42f1-87bf-50


 
 
 

Create a class named Customer that will determine the monthly repayment amount due by a customer for a product bought on credit. The class has five (5) fields: customer name, contact number, product price, number of months and the monthly repayment amount. Write get and set methods for each field, except for the monthly repayment amount field. The set methods must prompt the user to enter the values for the following fields: customer name, contact number, product price and number of months. This class also needs a method to calculate the monthly repayment amount (product price divided by the number of months). Add a subclass named Finance_Period that will determine if a customer will pay interest or not. If the number of months to pay for the product is greater than three, the customer will pay 25% interest, else no interest applies. The maximum amount of months to pay for the product is 12. Override the calculate_repayment() method by determining if the customer will pay interest or not and calculate the monthly repayment amount. Create a class called Customer_Finance that contains the logic to test the two dasses. Prompt the user for data for the first object where no interest applies and display the resuits; then prompt the user for data where interest is applicable and display the results. Sample Screen Shots: Customer Name 2 Please enter the customer name Joe Bloggs Customer Contact 2 Please enter the customer contact number 0821121547 OK Cancel OK Cancel Product Price ? Please enter the price of the product 5000 OK Cancel Number of Months ? Please enter the number of repayment months 10 OK Cancel The following output is where interest is applicable: Message Customer Name: Joe Bloggs Customer Contact: 0821121547 Product Amount: R 5,000 Repayment Months: 10 Monthly Repayment:R 625 Total Due: R 6,250 OK The following output is when interest is NOT applicable: Message Customer Name: Joe Bloggs Customer Contact: 0821121547 Product Amount: R 5,000 Repayment Months: 3 Monthly Repayment: R 1,666.67 Total Due: R 5,000 OK Question 1 Mark Allocation Marking Guideline Mark Examiner Moderator Correct Customer class created 8 Correct variables and methods created - 8 marks Attempted but not correct - up to a maximum of 4 marks Not attempted - 0 marks Additional calculation class created Subclass with correct calculate_repayment() method - 5 marks Attempted, but not correct - up to a maximum of 2 marks Not attempted - 0 marks Get and set methods created in second class Get and set methods created in second class - 4 marks Attempted but not correct - 1 marks Not attempted - 0 marks Input and Output (use of JOptionPanes) All input and outputs correct - 4 marks Some correct - up to a maximum of 2 marks Not attempted - 0 marks Customer Finance class created Two objects instantiated and methods applied - 8 marks Attempted, but not totally correct - up to a maximum of 5 marks Not attempted- 0 marks Save file correctly Good Programming Practise Code Efficiency 2 1 Comments TOTAL 35 1.

Step by Step Solution

3.58 Rating (166 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

import javaxswingJOptionPane public class CustomerFinance public static void mainString args TODO Au... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!