--Originally published at chozaoop
Whoops, forgot to upload this one.
The WSQ is about making a Greatest Common Divisor or GCD for short.
Early java assigments in which we had to expore how to give a responsibility to a class.
If i can remember, Cesar Augusto, Cesar Cortez and me joined as a team to make this WSQ so we basically have the same code, we worked together to find out how could we solve this, it was kinda simple, first we make the calculus and logic on a blank paper then we translated it to Java.
Here’s a snip from the code:
First we initialized the varibles n and result. No constructor needed, we have a single class which basically does everything, add the x and y parameters. Enter a while loop in which it makes the whole GCD process which i can’t clearly recall right now, or increment the value of n, return the result and that’s what it’s print.
Made a new instance called gcd, used it trying 50 and 78 and evidently the GCD is 2.
Again, as a team we decided to only upload it to Cesar Augusto’s Github, so there it is.

