Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 

README.md

Object-Oriented Programming Documentation

Documentation for OOP concepts in Java.

Topics

Core Concepts

The Four Pillars of OOP

  1. Encapsulation: Bundling data and methods that operate on that data
  2. Inheritance: Creating new classes based on existing ones
  3. Polymorphism: Objects taking multiple forms
  4. Abstraction: Hiding complex implementation details

Quick Reference

// Class definition
public class Person {
    private String name;
    private int age;
    
    public Person(String name, int age) {
        this.name = name;
        this.age = age;
    }
    
    public String getName() {
        return name;
    }
}

// Inheritance
public class Student extends Person {
    private String studentId;
    
    public Student(String name, int age, String studentId) {
        super(name, age);
        this.studentId = studentId;
    }
}

// Interface
public interface Drawable {
    void draw();
}

Learning Path

  1. Understand classes and objects
  2. Learn about encapsulation and access modifiers
  3. Study inheritance relationships
  4. Master polymorphism concepts
  5. Implement abstraction using interfaces
  6. Apply design principles

Practice Exercises

Refer to the java-oop module for practical implementations and examples.