Object Oriented Programming

When writing code, it is best to limit the duplication of code as much as possible. To that end, I am going to share here the articles and websites I used to get what I feel like is a good grasp on the idea of objects and OOP.

I started with a good understand of what objects and classes are, as defined by Oracle:

https://docs.oracle.com/javase/tutorial/java/concepts/

I also read part 5 of the transcript from a David Gries speech here:

https://www.cs.cornell.edu/gries/programlive/OOfirst.pdf

Next, I went through part 3 of Yakov Fain’s book Java Programming for Kids. Yes, its for kids but combined with the 2 listed above I was able to get what I consider a sound understand of how objects and classes work.

http://yfain.github.io/Java4Kids/#_meet_classes_the_main_language_constructs

Please share any insight on OOP that you care to. My mind is an open book at this point and I’m trying to take in everything I can. Thanks in advance.

Next I’m going to start on actual programming, the obligatory “Hello, World” type stuff as well asĀ  operators, which I want to take a deep look at, it seems relational are usually taught early and the others added in as needed but I’d like to cover everything up front, we’ll see how that goes.

 

 

 

 

 

Advertisements

Discussion

I want to make it a point to discuss and explain everything I cover, as I cover it. I’m hoping this will give me a better understanding of everything. So, I would like to take a step back and expand on a few things I have learned so far.

First of all, Java.

Java was developed by James Gosling at Sun Microsystems and released in 1996. In 2006, Sun made Java available under the GNU General Public License (GPL). It is written to run on any type of processor because it uses a Java Virtual Machine (JVM) to run the software (bytecode) and translate it on the fly to a language any processor can understand.

  1. Program written in Java ->
  2. Compiled into bytecode (understood by JVM but not the OS) ->
  3. Run in the Java Virtual Machine ->
  4. Translated to machine language usable by any processor or operating system

The end-user must have Java installed on their machine to execute the program.

Next, the JDK.

The Java Developers Kit comes in 3 flavors, Standard Edition (SE), Enterprise Edition (EE) and Micro Edition (ME). We will be using SE (the links in my last post pointed to this edition). The kit comes with a collection of programming tools, some, like the compiler and loader, I will be using right away, others I will be learning more about as I go. The JDK comes with a complete JRE, JVM, and the Java API. The Java API is a set of classes written in Java that can be used to aid your programming by allowing you to call those classes instead of writing new ones for things like file access and displaying text on the screen. This kit is really everything you need to write and applications.

And Finally, the next step.

Next I will be going through some various Java tutorials and other texts with the goal of coming up with a good definition of Object Oriented Programming, how it works, and how to visualize it so that I have a complete understanding of the concept and how it can work for me.