Skip to content

Phase 2 – Object-Oriented Programming (2–3 months)

Classes, Objects, Attributes, and Methods

  • Class structure
  • Object instantiation
  • Use of this
  • Best practices: naming, code organization

Encapsulation, Inheritance, Polymorphism, and Abstraction

  • Encapsulation: private, getters/setters, validation
  • Inheritance: extends, overriding (@Override)
  • Polymorphism: Subtype, method overloading
  • Abstraction: overview, preparation for interfaces and abstract classes

Interfaces and Abstract Classes

  • Interfaces: implements, default methods
  • Abstract classes: abstract and concrete methods
  • Differences between interface and abstract class

Constructors, Initializers, and Static Blocks

  • Default and parameterized constructors, calls with this()
  • Initialization blocks ({}) and static blocks (static {})

Enumerations

  • Creating and using enum
  • Methods and attributes in enums

Basic Collections

  • ArrayList: addition, removal, iteration (for, forEach, Iterator)
  • HashMap: key-value, common operations
  • HashSet: duplicate elimination
  • Introduction to Queue and Stack (e.g., LinkedList as queue/stack)
  • Introduction to Java Collections Framework

Basic Algorithms

  • Linear and binary search
  • Sorting: Bubble Sort, Collections.sort()
  • Recursion: concepts and simple examples (e.g., factorial, Fibonacci)
  • Introduction to complexity (O(n), O(log n))

Generics

  • Syntax (), generic collections, generic methods
  • Bounds (extends, super)

Stream API (Introduction)

  • Basic operations: filter, map, collect
  • Examples with ArrayList

Unit Testing (Introduction)

  • Basic use of JUnit
  • Writing test cases for classes and methods
  • Introduction to TDD (Test-Driven Development)

Final Project

  • Library System
  • Classes: Book, User, Library
  • Inheritance: DigitalBook and PhysicalBook
  • Collections: ArrayList for books, HashMap for loans
  • Encapsulation: data validation
  • Git: commit per feature (e.g., feature/book-management)
  • Publish on GitHub with explanatory README

Updated Resources