Question 1: Change your fraction class so that its instance variables numerator and denominator are hidden (i.e. private). Check that your old client class will not now compile (i.e, if the Fraction class instance variable name ‘numerator' was used in the client class).
Question 2: Add a public method isZero to your fraction class for testing whether the calling fraction is equal to the number zero. Modify your old client class so that it now loops until a fraction representing zero is entered.
Question 3: Add two more public methods: equals which determines whether two fractions represent the same number and add which adds another fraction to the calling fraction and returns a fraction result. Make a client which loops around getting two fractions from the user and outputting their sum and whether or not they are equal. Keep looping until the first fraction entered is zero.