Skip to content

Instantly share code, notes, and snippets.

View jonthejon's full-sized avatar

Jonathan Oliveira jonthejon

View GitHub Profile

Keybase proof

I hereby claim:

  • I am jonthejon on github.
  • I am jonthejon (https://keybase.io/jonthejon) on keybase.
  • I have a public key ASCBTWEQ6925JAyw6ZBIJhKXm-nUc6DNwoK0egFuElLAJwo

To claim this, I am signing this object:

@jonthejon
jonthejon / gist:48195f957982947ff45637ce96d112bb
Created January 17, 2018 13:59
Questions from W1D2 of LHL
What is it mean when you say a language is object-oriented and why could it be considered an improvement over a procedural language?
R: This kind of programming language should facilitate the process of invention and design by letting you encode abstractions that reveal the way things work. In contrast with procedural languages, OOP allows you to hid the interaction between a function and its data.
What are structures and why are they useful?
R: It's a unit of abstraction in the C language. Structures group data elements into larger units that can then be handled as single entities.
What is the difference between an instance method and a class method and how do you differiate the two?
R: An Instance method is a method that is tied to a particular instance of a class and therefore can access Instance variables particular to that instance. A class method is a method that resides inside the Class definition, outside of any instance. In objective C you can diferentiate them with the signs at the beginning of th
@jonthejon
jonthejon / AND_Gate.java
Last active April 27, 2017 20:29
Please, start the assessment through the Test file: N_BitAdderTest.java. (See 'ReadMe.md' and 'UnderstandingSignedBinaryNumbers.txt' files of the repository https://github.com/jonthejon/VonNeumann_BasicMachine.git for more info)
package org.jonathanoliveira.logic_gates;
/*
* All gates are made of components, no matter how many.
* An AND gate must be able to receive a certain number of inputs and come out with the proper output.
*
* So, in essence, the behavior of an AND gate is the following:
* if (ALL INPUTS): true, then OUTPUT == true
* if (AT LEAST 1 INPUT): false, then OUTPUT == false
*