//Program to calculate the GCD of 2 numbers
//By Neil Broadbent

public class GCDClass implements GCDInterface
{
    int iGCD;
    int tN1, tN2;
    
    public GCDClass(int N1, int N2)
        {
            tN1=N1;
            tN2=N2;
        }

    public int GCD(int N1, int N2)
        {
		if(N2 == 0){
			return N1;
		}else{
			return GCD(N2, N1%N2);
		}
        }

    public int getGCD()
        {
            int iGCD = GCD(tN1,tN2);
            return iGCD;
        }
}


