A project completed as part of the class CSC 240 at Parkland College.
Design a program that implements Euclid’s algorithm for finding the greatest common divisor (also known as greatest common factor, highest common divisor, or highest common factor) of two positive integers. The greatest common divisor is the largest integer that divides both values without producing a remainder. An iterative version of this method was part of the RationalNumber class in Chapter 7.4 of the textbook. Write a RationalNumber class containing a numerator and denominator as its fields. Write a recursive method (named gcd) that computes and returns the greatest common divisor of the numerator and denominator. Write a driver that prompts the user for a numerator and denominator, creates a RationalNumber object and computes and prints the greatest common denominator using the recursive gcd method as shown below.
Enter positive integer as numerator: 108
Enter positive integer as denominator: 144
Greatest common denominator of 108/144 is 36