3.1 Lesson Outcomes
After completing this lesson, learners will be able to:
- Define Object-Oriented Programming System (OOPS).
- Explain classes, objects, methods, and method passing.
- Explain the pillars of OOPS.
- Differentiate between inheritance, abstraction, encapsulation, and polymorphism.
- Explain aggregation, association, and composition.
- Explain the advantages of OOPS in software development.
3.2 Overview
Object-Oriented Programming System (OOPS) is a programming approach that organizes software around objects and classes. OOPS helps developers create reusable, maintainable, and scalable applications.
This lesson introduces learners to OOPS concepts, pillars, object relationships, and advantages used in Java software development.
OOPS is widely used in:
- enterprise applications,
- banking systems,
- healthcare systems,
- Android applications,
- and software engineering.
Understanding OOPS is important because modern Java applications are primarily developed using object-oriented principles.
KT0101 — Definition
Object-Oriented Programming System (OOPS) is a programming approach that uses:
- objects,
- classes,
- methods,
- and data
to design software applications.
OOPS organizes programs into reusable and structured components.
Characteristics of OOPS
OOPS supports:
- modularity,
- reusability,
- scalability,
- and maintainability.
Importance of OOPS
OOPS improves:
- software organization,
- code reuse,
- and application management.
KT0102 — Concepts
Class and Types
A class is a blueprint used to create objects.
Classes define:
- fields,
- methods,
- and behaviors.
Example of a Class
public class Student {
String name;
int age;
}
Object
An object is an instance of a class.
Objects contain:
- state,
- behavior,
- and identity.
Example of an Object
Student student1 = new Student();
Method and Method Passing
A method is a block of code used to perform a task.
Methods may receive values called parameters.
Example of a Method
public void displayName(String name) {
System.out.println(name);
}
Importance of OOPS Concepts
These concepts support:
- reusable code,
- organized applications,
- and object-oriented design.
KT0103 — Pillars/Elements
Inheritance
Inheritance allows one class to inherit properties and methods from another class.
Example
class Animal {
void sound() {
System.out.println("Animal Sound");
}
}
class Dog extends Animal {
}
Abstraction
Abstraction hides unnecessary implementation details and displays only important information.
Example
abstract class Shape {
abstract void draw();
}
Encapsulation
Encapsulation combines data and methods into one unit and protects data using access modifiers.
Example
private int age;
Polymorphism
Polymorphism allows methods to perform different behaviors.
Example
void display() {
System.out.println("Display");
}
Aggregation
Aggregation represents a weak relationship between objects.
One object can exist independently of another.
Example
A department and lecturers relationship.
Association
Association represents a relationship between objects.
Objects communicate with each other.
Example
A teacher teaches students.
Composition
Composition represents a strong relationship between objects.
If the parent object is destroyed, child objects are also destroyed.
Example
A house and its rooms.
Importance of OOPS Pillars
The pillars support:
- reusable code,
- secure design,
- scalable applications,
- and structured development.
KT0104 — Advantages of OOPS
OOPS provides several advantages in software development.
Advantages of OOPS
| Advantage | Description |
|---|---|
| Reusability | Reuse existing code |
| Maintainability | Easier updates |
| Scalability | Supports large systems |
| Security | Protects data |
| Modularity | Organized structure |
Importance of OOPS Advantages
OOPS advantages improve:
- software quality,
- application structure,
- and development efficiency.
3.5 Key Notes / Summary
- OOPS is a programming approach based on objects and classes.
- Classes are blueprints for creating objects.
- Methods perform tasks inside classes.
- Inheritance supports code reuse.
- Abstraction hides implementation details.
- Encapsulation protects data.
- Polymorphism supports multiple behaviors.
- Aggregation, association, and composition define object relationships.
- OOPS improves scalability and maintainability.