Java and OOP for a Newbie
Delving into a new platform like Java can be intimidating and frustrating. Luckily there is access to sites like Oracle and YouTube that can help even the newest programmer navigate Java. A programmer will also need an IDE for Java, and Nextstacks list many free options, such as Eclipse. YouTube has videos that also assist with the use of this IDE. All these sites walk programmers through how to download, install, and use many different platforms.
Now, let us discuss object-oriented design principles (OOP)
concepts and features. Raymandlewallen (2005) discusses the concepts of encapsulation,
data abstraction, inheritance, and polymorphism. Encapsulation is the hiding of
data implementation by restricting access to accessors (used to ask an object
about itself) and mutators (used to modify the state of an object). Data abstraction
is the creation of data objects that represent real objects. Inheritance allows
for the copy functionality from another class, called a superclass or base
class. Polymorphism has many different methods with the same name but somewhat
different functionality.
Oracle has excellent resources on OOP and discusses them in
a user-friendly way. Oracle (2015) defines the terms object, class, inheritance,
interface, and package. Software objects are similar to real-world objects:
they consist of state and related behavior (Oracle, 2015e). A class is a
blueprint for creating individual objects (Oracle, 2015b). Object-oriented
programming allows classes to inherit commonly used states and behavior from
other classes (Oracle, 2015c). Methods form the object's interface with the
outside world; the buttons on the front of our TV, for example, are the
interface between us and the electrical wiring on the other side of its plastic
casing (Oracle, 2015d). A package is a namespace that organizes related classes
and interfaces, like folders on a computer (Oracle, 2015f).
Java T Point (n.d.) touches on other terms relevant to OOP,
such as coupling, cohesion, association, aggregation, and composition. Coupling
is the dependence on another class, and association is the relationship between
the objects (One to One, One to Many, Many to One, and Many to Many). Cohesion
is the level at which an element performs a task. Aggregation and composition are
the relationships of one object containing another.
References:
Geeky Script. (2022a, March 20). How
to install Eclipse IDE 2022-03 on Windows 10/11 with JDK. YouTube. https://www.youtube.com/watch?v=h7dR_9RcnY8
Geeky Script. (2022b, September
23). How to install Java 19 on Windows 10/11. YouTube. https://www.youtube.com/watch?v=74jD-gx4XwE
Java.com. (n.d.). Download
java for windows. https://www.java.com/download/ie_manual.jsp
Java T Point.
(n.d.). Java OOPs concepts. http://www.javatpoint.com/java-oops-concepts
M, S. (2022, January 25). Top
5 free ideas for java development. NextStacks. https://blog.nextstacks.com/java-ides/#:~:text=JDeveloper%20Java%20IDE%20that%20is%20created%20and%20distributed,the%20full%20development%20lifecycle.%20Platforms%3A%20Windows%2C%20Linux%2C%20macOS
Oracle. (n.d.). Java downloads.
https://www.oracle.com/java/technologies/downloads/
Oracle. (2015a). Lesson:
Object-oriented programming concepts. http://docs.oracle.com/javase/tutorial/java/concepts/index.html
Oracle. (2015b). What
is a class?. https://docs.oracle.com/javase/tutorial/java/concepts/class.html
Oracle. (2015c). What
is an inheritance?. https://docs.oracle.com/javase/tutorial/java/concepts/inheritance.html
Oracle. (2015d). What
is an interface?. https://docs.oracle.com/javase/tutorial/java/concepts/interface.html
Oracle. (2015e). What
is an object?. https://docs.oracle.com/javase/tutorial/java/concepts/object.html
Oracle. (2015f). What
is a package?. https://docs.oracle.com/javase/tutorial/java/concepts/package.html
Raymondlewallen.
(2005, July 19). 4 major principles of object-oriented programming. [Blog
post]. World Documents. https://vdocuments.net/4-major-principles-of-object.html
Roy, D. (n.d.). Eclipse
downloads. The Community for Open Innovation and Collaboration. https://www.eclipse.org/downloads/download.php?file=%2Foomph%2Fepp%2F2022-09%2FR%2Feclipse-inst-jre-win64.exe