Write a class which finds the greatest common factor (GCF) of two positive integers.
Example 1: the GCF of 35 and 25 is 5.
Example 2: the GCF of 2 and 7 is 1.
Class GCF should have a the following methods:
Below is a tester for class GCF which you need to use to test your program.
/** * >>>>>> TESTER for class GCF --- This code is complete <<<<<< * * makes an object of class GCF and prints out the greatest * common factors of several pairs of numbers */ public class GCFTester { public static void main(String args[]) { GCF nums = new GCF(); nums.printGCF(12, 20); // prints: GCF of 12 and 20 is 4 nums.printGCF(3, 9); // prints: GCF of 3 and 9 is 3 nums.printGCF(17, 13); // prints: GCF of 17 and 13 is 1 nums.printGCF(100, 75); // prints: GCF of 100 and 75 is 25 nums.printGCF(90210, 12561); // prints: GCF of 90210 and 12561 is 3 } }