Question: Java task, down below is a link to my code Heres my code: https://codeshare.io/Gb1wKO Make the instance variables of class 'Fraction' private. Add an instance

Java task, down below is a link to my code

Java task, down below is a link to my code Heres my

Heres my code: https://codeshare.io/Gb1wKO

Make the instance variables of class 'Fraction' private. Add an instance method 'toString(' to the public interface of class 'Fraction', transforming the object into a string with the form ' . Finish the constructor for class 'Fraction' so that a 'Fraction' is constructed that represents the simple form of the fraction '/'. Add a constructor to class 'Fraction' with an 'Integer' as parameter. The 'Fraction' constructed represents the integer specified as a parameter. Add three instance methods to the public interface of class 'Fraction' which all return a 'Fraction' as a result: an instance method 'add(Fraction fraction)' resulting in the sum of the object and the parameter, an instance method 'subtract(Fraction fraction)' resulting in the difference between the object and the parameter and an instance method 'multiply(Fraction fraction)' resulting in the product of the object and the parameter

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!