Java Installation Guidance
Installing Java on my machine was, shall we say, a challenge. I installed JDK 21 multiple times, but no matter how many times I executed the downloaded file, or restarted my machine, it would not show up as a program in my start menu. JRE 8 installed with no issue at all, but when I downloaded Eclipse, JRE 8 was not recognized by the IDE. I uninstalled everything and started over. This time I downloaded the executable file for JDK 17 for Windows from https://www.oracle.com/java/technologies/downloads/#java17 and followed the installation instructions step-by-step from https://docs.oracle.com/en/java/javase/17/install/installation-jdk-microsoft-windows-platforms.html#GUID-DAF345BA-B3E7-4CF2-B87A-B6662D691840. I still wasn't sure if it had downloaded correctly because Eclipse still didn't want to find the JDK. So I uninstalled Eclipse again and downloaded NetBeans instead. Lo and behold...SUCCESS! Using the Hello World! tutorial at https://docs.oracle.com/javase/tutorial/getStarted/cupojava/netbeans.html I created a program called HelloMyNameIsApp, as seen below.
Object-oriented programming concepts are guidelines and principles used by developers in software engineering to create systems that are easier to understand, maintain, and extend, leading to improved code quality and reduced development time and cost. These principles enable developers to organize code into reusable, modular, and understandable components known as objects.
Code can be bundled into individual software objects, the fundamental building blocks of object-oriented design. They encapsulate data (attributes) and behavior (methods) into a single unit. Objects represent real-world entities and interact with each other to perform tasks. This bundling has several benefits to the programmer. It allows for easier debugging because they only have to look within one object instead of the entirety of the program. Software objects can be shared among programmers and can be plugged into programs without having to completely rewrite that section, which can make coding faster.
Classes are blueprints or prototypes for creating objects. They encapsulate the attributes and methods that define the properties and behavior of objects and define the structure and behavior of objects of a particular type. In the real world this would translate to many objects of the same kind. Radios built using same schematics or vehicles of the same model.
Encapsulation is the concept of bundling data and methods that operate on that data within a class. This hides the object's internal state and all interaction must be performed through well-defined interfaces. This helps maintain data integrity and reduces the risk of accidental changes.
Hiding unnecessary details and exposing a simplified interface for interaction is known as abstraction. It involves simplifying systems by modeling only the relevant properties and behaviors of objects. Abstraction allows a developer to focus on what an object does rather than how it does it.
Inheritance is a mechanism that allows a new subclass to inherit properties and behaviors from an existing class. It promotes reuse of code and the creation of hierarchies of classes. Subclasses can extend or override the behavior of their parent classes. A real-world example of this would be a base model of a car vs. the limited model. The limited is the base model with additional upgrades, technology, and features.
Polymorphism refers to the ability of different classes to take on many forms or behave differently while sharing a common interface or base class. It enables objects of different classes to be treated as objects of a common superclass. Polymorphism simplifies code, promotes code reuse, and allows for the creation of more flexible software systems. There are two main types of polymorphism: compile-time, or method overloading, and runtime, or method overriding.
Object-oriented programming concepts are essential in software engineering. They guide developers in creating strong, manageable, and adaptable software. Following these principles improves code quality and lowers development time and expenses.
Comments
Post a Comment