System.out.println("Java Installation // Object-Oriented Principles")
Java is an object-oriented programming language that takes little time to install and begin simple programming. It is also complex enough to handle all tasks. "Object-oriented programming is a methodology or paradigm to design a program using classes and objects" (Java OOPs Concepts - Javatpoint, 2011). To begin programming with Java, you need two primary components. Java development kit and an IDE or integrated development environment. I was able to get started on my W10 PC following the "getting started" link here. Below are some of the key components and concepts of Java and object-oriented programming.
Once you have Java installed and functioning, you may want to read some sources that provide different takes on the components above. I have always found it helpful to read multiple references to get a better understanding of concepts and two that I found helpful are listed below.
Below are how I think of the principles.
Object-oriented programming is based on the concept of state and behavior. Objects have states. Color, size, on, off, weight, and speed are all examples of the state of an object. Objects also have behaviors or actions. some examples are slow down, turn left, turn off, turn on, or focus.
Objects can also be grouped by class. A class is a template for other objects and it has some characteristics that all other objects that use it must have. An example is the class cars. This class may have some definitions that all sub-classes will have, such as steering wheel, blinkers, lights, seats, and wheels.
Objects and classes lead us to inheritance. Objects of class cars will have all the characteristics of the parent so if we have an object car, which is of class cars, it will inherit all properties of the class cars, but will also have some properties unique to itself.
Interfaces are how the outside world interacts with objects. We could consider the pedals on a bike the interface to speed it up or the handlebars the interface to turn left.
Packages are ways to group similar or related items together.
Once you feel comfortable with the basic concepts, it is time to begin creating some code. Return to the getting started page in the Java tutorials and begin the "Hello World!" application. It provides an excellent way to begin creating a project and introduces you to compiling and running code.
Feel free to contact me via my contact form or subscribe to my blog.
References
Java OOPs Concepts - Javatpoint. (2011). Www.javatpoint.com. https://www.javatpoint.com/java-oops-concepts
Comments
Post a Comment