Programming 2 - Advanced Object Oriented Programming Home
Welcome to Programming 2 - Java OOP
Object-Oriented Software Development
Object-oriented programming (OOP) is a programming paradigm that uses "objects" – data structures consisting of data fields and methods together with their interactions – to design applications and computer programs. Here's a brief overview of the key concepts we cover in the course:
Classes: Think of a class as a blueprint for creating objects. A class defines the properties (data fields) and behaviors (methods) that the objects created from it will have.
Objects: These are instances of classes. An object in OOP is a self-contained component that consists of methods and properties to make a particular type of data useful. Object properties can include things like color, size, text, or numbers.
Aggregation: This is a particular type of association in which objects are assembled or configured together to create a new object. It's often referred to as a "has-a" relationship, where one object is a part of another object.
Encapsulation: This is the practice of keeping the fields (data) in a class private and then providing public methods (getters and setters) to access and modify them. It's a protective barrier that keeps the data and code safe within the object and prevents unauthorized access.
Inheritance: This is a mechanism where a new class is derived from an existing class. The new class, known as a subclass, inherits the attributes and methods of the parent class. It allows for reusability of code and can be thought of as a "is-a" relationship.
Polymorphism: This concept allows objects of different classes to be treated as objects of a common superclass. It's the ability of different classes to respond to the same method call in different ways.
Interfaces: An interface in OOP is a completely "abstract class" that is used to group related methods with empty bodies. Implementing an interface allows a class to become more formal about the behavior it promises to provide.
Abstraction: This is the concept of hiding the complex reality while exposing only the necessary parts. It's a way of creating a simple model of a more complex underlying entity, which includes only the details that are relevant to the current perspective.
Object Design: This is a phase in the software development process that involves planning the structure and relationships between different objects in a system. It's where the conceptual model is translated into actual code.
Each of these concepts plays a vital role in the development of applications using the object-oriented programming paradigm, allowing for code that is more modular, flexible, and easier to understand and maintain.
Java is a programming language and computing platform first released by Sun Microsystems in 1995. It has evolved from humble beginnings to power a large share of today’s digital world by providing a reliable platform upon which many services and applications are built. New, innovative products and digital services designed for the future continue to rely on Java, as well.
History of Java
The birth of Java happened in 1991 when James Gosling and his team began work on creating the language at Sun Microsystems. Shortly after, the team switched their focus to developing the language for the newest niche market known as the World Wide Web. By 1995, Java was released to the public for use in various applications, from the internet to computer programming.
Java stood alone as a programming language because it handles code translation differently than other languages. Unlike other programming languages, it goes through two major steps before running in its environment. Most programming languages only translate one time, either by compiling the code or interpreting it. This difference made a significant impact on the rapid growth and popularity of the language.
Java began as a project for connecting systems, such as connecting office devices on a network and creating interactive television. However, the switch to using Java for the internet came on a heel-turn and led to Java taking the lead as the number one programming language for the interactive web or — web 2.0 as developers commonly refer to it in discussions.
In software engineering, high cohesion and low coupling are two important principles for designing modular and maintainable software systems.
High cohesion refers to the degree to which the elements within a module are related and work together to perform a single, well-defined task. In other words, high cohesion means that the components within a module have a strong functional and logical relationship with each other.
Low coupling, on the other hand, refers to the degree to which modules in a software system are independent of each other. In other words, low coupling means that the modules in a system interact with each other as little as possible, with each module having its own well-defined responsibilities and interfaces.
High cohesion and low coupling are often considered desirable qualities in software design because they help to make the system more modular, flexible, and easier to maintain. When modules are highly cohesive, it is easier to understand their functionality, and when they are loosely coupled, it is easier to modify or replace them without affecting other parts of the system.
Author: Kevin Roark
Email: kevin.r.roark@gmail.com
Edition/Version: 1
Publication Date: 2024
Courses: COSC-1437 / ITSE-2457
This digital content is the exclusive property of the author and is protected under copyright law. Access to this material is granted strictly by permission from the author. Any unauthorized use, distribution, reproduction, or alteration of this content without explicit permission is strictly prohibited. By accessing this material, you acknowledge and agree to these terms, respecting the author's rights and the integrity of their work
COSC-1437 / ITSE-2457 Computer Science Dept. - Author: Dr. Kevin Roark