Implement the simple methods getnum and getden that will


Problem

1. Implement the simple methods get_num and get_den that will return the numerator and denominator of a fraction.

2. In many ways it would be better if all fractions were maintained in lowest terms right from the start. Modify the constructor for the Fraction class so that GCD is used to reduce fractions immediately. Notice that this means the __add__ function no longer needs to reduce. Make the necessary modifications.

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: Implement the simple methods getnum and getden that will
Reference No:- TGS02641470

Expected delivery within 24 Hours