Create a Fraction class.
It should have encapsulated numerator and a denominator fields, along with the following methods:
- getDouble, which returns the fraction in decimal format
- isImproper, which returns true if the fraction is improper
- isLowestTerms, which returns true if the fraction is in its lowest terms
- getLowestTerms, which returns the fraction in its lowest terms
- toString, which returns the String representation of the fraction
- add, which takes a Fraction argument and returns the sum of this fraction and its argument
It should also have an appropriate constructor.
You should also provide an overloaded toString method which takes a boolean argument which, if true, causes the function to return the fraction as a mixed fraction and if false does not.
Does your IDE tell you something about the toString method? Find out and explain what it is telling you and why.
Create a main method to instantiate some fractions and play with them.