WSQ – 06

--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:

WSQ – 06WSQ – 06

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.


WSQ – 06

WSQ06 – Greatest Common Divisor

--Originally published at finntc2016

Doing WSQ06 took some time, since it was the first WSQ where I actually needed to write object oriented code. I didn’t only rewrite my non object oriented Python code from last semester to Java but really create a number-class that has its fields and members and accomplishes its responsibilities.

Here you can find the corresponding repository:
https://github.com/finntec/wsq06.git


WSQ06 – Greatest Common Divisor

Grea… oh look, I got confused there… and there…aaand there… well crap.

--Originally published at Juan Salvador Fernández Contreras

As I mentioned in another post, both this and the next WSQ were made with the help of Gerardo Cruz, plus I had already made a versión of boh back in Python, so I imagined more or less what to expect.

Grea… oh look, I got confused there… and there…aaand there… well crap.

Yep, your eyes are not lying, the blue word IS Aguacate, don’t judge.

I’m kind of scared because, since in this WSQ I both had the previous experience from Python and the aid of a partner and still had a hard time doing it, well, yeah.

As you can tell I got confused with the name of the class.


Grea… oh look, I got confused there… and there…aaand there… well crap.

Grea… oh look, I got confused there… and there…aaand there… well crap.

--Originally published at Juan Salvador Fernández Contreras

As I mentioned in another post, both this and the next WSQ were made with the help of Gerardo Cruz, plus I had already made a versión of boh back in Python, so I imagined more or less what to expect.

Grea… oh look, I got confused there… and there…aaand there… well crap.

Yep, your eyes are not lying, the blue word IS Aguacate, don’t judge.

I’m kind of scared because, since in this WSQ I both had the previous experience from Python and the aid of a partner and still had a hard time doing it, well, yeah.

As you can tell I got confused with the name of the class.


Grea… oh look, I got confused there… and there…aaand there… well crap.

The GREATEST COMMON DIVISOR #WSQ06

--Originally published at My Programming Course

In this WSQ we had to find the Greatest Common Divisor for 2 numbers. It wasn't that hard because we already did it on Python. I used % in my code because it is the easiest way to know if a number is an entere divisor of another. Took the lowest number in a while and started resting 1 and keep doing evaluations between the 3th number and the two that are asked to find.

I imported a library which helps me ask for an Integer. 

 

The GREATEST COMMON DIVISOR #WSQ06

The GREATEST COMMON DIVISOR #WSQ06

 

My code: https://github.com/YosefatJQ/TC201/blob/master/GCD.java

The GREATEST COMMON DIVISOR #WSQ06

--Originally published at My Programming Course

In this WSQ we had to find the Greatest Common Divisor for 2 numbers. It wasn't that hard because we already did it on Python. I used % in my code because it is the easiest way to know if a number is an entere divisor of another. Took the lowest number in a while and started resting 1 and keep doing evaluations between the 3th number and the two that are asked to find.

I imported a library which helps me ask for an Integer. 

 

The GREATEST COMMON DIVISOR #WSQ06

The GREATEST COMMON DIVISOR #WSQ06

 

My code: https://github.com/YosefatJQ/TC201/blob/master/GCD.java

#WSQ06 – Greatest Common Divisor

--Originally published at JAVALIO

During this first exercise in programming Cesar Cortez, Andres Choza and me, worked together because we have doubts about how to begin in Java world, after we talk for minutes we decided to start and at the end of the day, all of us knew a little bit more of Java, I have to thank them because with their help I can programming better than before.

 

Greatest Commmon Divisor is a wsq where we have to find what’s the GCD of a number given, “when at least one of them is not zero, is the largest positive integer that divides the numbers without a remainder. For example, the GCD of 8 and 12 is 4” (Wikipedia,2016)

We use the method where you take both number and begin divide them by 2 then by 3 and go on, until the both of them cannot divide more with a same number, then multiply the numbers that pass and there is the result.

Here’s our code:

Github: https://github.com/cesarau04/WSQ-Java/blob/master/wsq06.java

Image by: Jorge Franganillo


#WSQ06 – Greatest Common Divisor

Valentine’s day: Method not found

--Originally published at Social coding

I needed to finish my WSQs so I grab the coffee, my pc and some food and began the coding.
First, I need to say something to my pc because Valentine’s day. PC I love you more than Java. Ok, I know I am really bad at flirting and the computer is no exception.

Keep focus! You need to work, you need the PC to be proud. (This type of posts are what you got after not sleeping all weekend, thank you Tec!)
So here is the minimum common divisor, it was pretty easy and I did it with a friend to help him.

Valentine’s day: Method not found

And here is the Babylonian, I am surprised. They were very intelligent or have a lot of free time, imagine what we can do without Tec having all our time. Joking, we love all the work…please don’t strike me with the entrepreneurial lightning

Valentine’s day: Method not found


Valentine’s day: Method not found

#WSQ06-Greatest Common Divisor

--Originally published at diegotc2016

Doing this WSQ was more or less easy for me, the only difficult part was that I didn’t remember how to do the greatest common divisor of two numbers, so I searched in youtube for an example. The other difficult part was the java syntax, I’ve programmed in python for a year and learning java is becoming a challenge for me but I’m getting better

Here’s the code In Eclipse:

#WSQ06-Greatest Common Divisor

#WSQ06-Greatest Common Divisor

Here’s the code in GitHub:

*****

Here’s the video:


#WSQ06-Greatest Common Divisor

#WSQ06 Greatest Common Divisor

--Originally published at Fernando Partida's Blog

That’s Just F***in’ Great

I had a lot of trouble remembering something from a movie or reference that was related to the title of this WSQ…

Just I had trouble finding a quirky play on the title of the WSQ, I had trouble doing this assignment, but after searching on the internet and going around other peoples WSQ’s I managed to make a working java program that lets the user input both numbers in order to find their greatest common divisor.

Here is an image of the code, and in the console you will see what happens after it is run.

#WSQ06 Greatest Common Divisor

Here is the code in my GitHub repository.

 


#WSQ06 Greatest Common Divisor