Before you write a single class, you need to see the problem object-oriented programming was invented to solve. This book builds that case with a small library system — Pustaka — whose procedural version starts breaking as it grows, and rebuilds it, concept by concept, first in Java and then in Python.
Overview
Object-Oriented Programming (OOP) exists as two parallel editions — one in Java, one in Python — that teach the exact same sixteen-stop roadmap, differing only in language idiom, so a reader who already knows one edition can use the other as a direct comparison of how the same idea looks in each language. The course opens by showing why a procedural library-management program (Pustaka) outgrows itself, then rebuilds it as classes with fields, constructors and encapsulation; adds arrays/lists and string-building; covers exception handling and file I/O; introduces interfaces and abstract classes; and moves into inheritance, polymorphism, generics and the collections framework, GUI programming with events and MVC, concurrency (threads, race conditions, synchronization), and networking with sockets. It closes by naming, in Design Patterns, what the Pustaka codebase has already been doing by then — and finishes with a capstone GUI-socket client-server project.
What You Will Learn
- Recognize when and why a procedural program needs to become object-oriented, not just how to write class syntax.
- Design classes around fields, constructors, and encapsulation, in both Java and Python idiom.
- Use inheritance, polymorphism, interfaces/abstract classes, and generics to build flexible, reusable code.
- Handle exceptions and file I/O robustly, and build a graphical interface with an event-driven MVC structure.
- Write concurrent code safely — threads, race conditions, synchronization — and network code with sockets, clients and servers.
- Recognize common design patterns as names for structures your own code has already converged on.
Inside the Book
- Introduction to OOP: From Procedures to Objects — why the Pustaka library program outgrows a purely procedural style.
- Anatomy of a Class: Fields, Constructors & Encapsulation — rebuilding Pustaka’s first entity as a real class.
- Primitive/Built-in Types, Control Flow, Strings & Debugging Tools — the language fundamentals every class relies on.
- Practice Problems: Classes, Fields, Encapsulation & Language Fundamentals — a worked checkpoint on the first block.
- Arrays/Lists & the String-Building Story — collections of objects, and building strings efficiently.
- Exception Handling & File I/O — making Pustaka’s data durable and its failures graceful.
- Interfaces & Abstract Classes — designing contracts between parts of a system.
- Practice Problems: The Midterm — Reviewing Lectures 1 Through 7 — the course’s midterm checkpoint.
- Inheritance & Polymorphism — sharing and specializing behavior across related classes.
- Generics & the Collections Framework — type-safe, reusable data structures.
- GUI Programming: Events & MVC — giving Pustaka a real graphical interface.
- Practice Problems: Quiz 2 — Reviewing Lectures 1 Through 11 — a second major checkpoint.
- Concurrency: Threads, Race Conditions, and Synchronization — making Pustaka safe under simultaneous access.
- Networking: Sockets, Clients, and Servers — turning Pustaka into a client-server system.
- Design Patterns: Naming What Pustaka Already Does — recognizing the patterns the codebase has already been using.
- The Final: A Capstone GUI-Socket Client-Server Project — Pustaka’s final form, graded as working software.
