Question: Question 3 (a) Interest rate amount is calculated based on the following conditions in Table 1. Write the calculate TotalRepayment () method definition. Table 1

 Question 3 (a) Interest rate amount is calculated based on the

Question 3 (a) Interest rate amount is calculated based on the following conditions in Table 1. Write the calculate TotalRepayment () method definition. Table 1 : Car Interest rate (b) A class called Fraction has two data members, an int numer and an int denom (for the numerator and denominator). (10 marks) i. Write a constructor that accepts values for the numerator and denominator as arguments. (3 marks) ii. Write a tostring method that returns a String representation of the fraction. (3 marks) iii. Write an equals () method for fraction. Assume that all common factors have been removed from numerator and denominator. (9 marks)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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 Databases Questions!