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:
I hereby claim:
To claim this, I am signing this object:
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 |
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 | |
* |