Question: Using python: Suppose a class called Fraction has been defined. The following statements appear in the end-users main program. Describe All of the methods that
Using python:
Suppose a class called Fraction has been defined. The following statements appear in the end-users main program. Describe All of the methods that MUST be defined in the Fraction class to allow this code to work. NOTE: Do NOT write the methods themselves, but rather describe which ones would need to be implemented to make this customers code work: from modFraction import Fraction f1 = Fraction(4,5 ); f2 = Fraction( 3,7) ; f3 = f1 + f2 #computes the sum of the fractions print(s3
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
