Beginner To Beginner: Getting Started with Java & Object Oriented Programming
Object oriented programming (OOP) is an approach that centers on objects and helps compartmentalize your code. OOP focuses on these objects rather than the logic of manipulating them, which lends itself well to complex or routinely updated code. There are many programming languages that use object oriented programming, but we will be focusing on Java. We will briefly discuss how to install Java, how to install an Integrated Development Environment (IDE), and touch on concepts and features of Object oriented programming.
Installing Java
Java is a programming language that utilizes object oriented programming. If you are pursuing a career in technology, there is a good chance your employer may require you to understand Java. Installing Java is rather simple, however if you have trouble you may refer to sources such as YouTube for assistance. I will link the YouTube video I used when installing Java at the end of this section. To begin installing Java, you should navigate to the official Oracle website by tying JDK install or following this link: https://www.oracle.com/java/technologies/downloads/?er=221886 .
Make sure you select the correct download version for your system. In my case, I downloaded the Windows version, using the x64 MSI installer. Continue to follow the steps on the download wizard to complete the installation. If you have difficulties you may refer to the following video, which I used when I downloaded Java.
Downloading the NetBeans IDE
To write code for Java, we will be using an integrated development environment (IDE). There are many IDEs to choose from, but I opted for the NetBeans IDE as it is sponsored by Oracle, and the Oracle website has tutorials with the NetBeans IDE in mind. I favor an IDE over a simple Notepad, as the IDE includes features intended for programming, such as code editors and debuggers. NetBeans is also simple to install, though I recommend installing Java before NetBeans so that Java already shows in the NetBeans menus. NetBeans can be installed by searching for NetBeans install, or by visiting this link: https://netbeans.apache.org/front/main/download/ .
If you have any difficulties installing the NetBeans IDE, you may reference this YouTube video for assistance: https://www.youtube.com/watch?v=_n_5_4bwSn4 .
Concepts of Object Oriented Programming
As previously stated, object oriented programming is centered around objects. We will begin with some brief definitions of important terms. Objects represent real-world entities and have states and behaviors. These objects encapsulate their properties and functionalities. A class is a prototype from which a program is created. Methods are the functions the object can perform. Attributes are the state of an object, and characteristics that distinguish classes.
There are four basic principles of object oriented programming. These principles are encapsulation, abstraction, inheritance, and polymorphism. Encapsulation is the self-containing of objects. Code is bound together as a single unit. Each object manages its own state. Abstraction involves hiding the innerworkings of an object and only showing the functions. Think of an item such as a washing machine. The average user knows the functions of selecting a load type, and temperature, then pressing start. They do not see the internals and how they work to complete those functions, but the user can still operate the machine fine. Inheritance is the ability for classes to reuse code and properties from other classes. This gives code reusability. Polymorphism is the ability for a task to be performed in different ways. Behaviors are shared but may take on many forms. A common example of this is commanding animals to speak. A duck will quack, a cat will meow, and a dog will bark, but they are all speaking.
For more support on the concepts and functions of object oriented programming, reference the articles below:



Comments
Post a Comment