Course Overview

This module builds advanced programming skills through a progressive, use-case-driven approach. Starting from object-oriented foundations, students advance through polymorphism, generics, exception handling, and Design by Contract, culminating in comprehensive coverage of creational, structural, and behavioural design patterns.

Every lecture extends the same SmartShelf library management system, providing continuity and depth — each week's concepts are applied to evolving, real-world code that students build incrementally.

Learning Outcomes

LO1

Critically evaluate the utility of OOP principles — abstraction, encapsulation, inheritance, and reusability

LO2

Apply polymorphism, generics, and type-safe collection hierarchies to design flexible, extensible systems

LO3

Implement robust exception handling strategies and Design by Contract for secure, resilient software

LO4

Select and apply appropriate creational, structural, and behavioural design patterns to solve real-world problems

LO5

Demonstrate advanced programming through hands-on implementation, integrating multiple patterns into cohesive applications

Lecture Slides

I

Foundations

Lectures 1–2 · OOP Principles, Immutability & Object Lifecycle

Object-Oriented Foundations & Principles Revisited
Abstraction, Encapsulation, Inheritance & Reusability
Lecture 1 · 4 Hours · LO1
01

SmartShelf: Book, Member, Library — core domain classes

  • Core OOP principles with a critical lens
  • Immutable vs mutable objects & design implications
  • Value equality vs reference equality
  • Defensive copies & aliasing dangers
  • Hands-on: ISBN, Book, Member, Library classes
Cloning, References & Object Lifecycle
Deep vs Shallow Copy, Value vs Reference Semantics
Lecture 2 · 4 Hours · LO1
02

SmartShelf: Reservation system — copying Book objects safely

  • Deep vs shallow cloning strategies
  • Reference semantics vs value semantics
  • Pitfalls of object copying & side effects
  • Sharing immutable references (ISBN reuse)
  • Workshop: Implement both cloning approaches
II

Intermediate Concepts

Lectures 3–5 · Polymorphism, Generics & Robust Design

Polymorphism, Dynamic Binding & Duck Typing
Compile-time vs Runtime, Method Dispatch
Lecture 3 · 4 Hours · LO2
03

SmartShelf: Multiple media types & search strategies

  • Compile-time vs runtime polymorphism
  • Method dispatch mechanisms
  • Duck typing as a paradigm
  • Flexible, extensible design through polymorphism
  • Static typing vs duck-typed exercises
Coming soon
Generics, Collections & the Liskov Substitution Principle
Type-Safe Polymorphism & Substitutability
Lecture 4 · 4 Hours · LO2
04

SmartShelf: Typed catalogs & member hierarchies

  • Generics as type-safe polymorphism
  • Working with collections: Lists, Maps, Sets
  • Liskov Substitution Principle (LSP)
  • Building generic data structures
  • Evaluating substitutability violations
Coming soon
Exception Handling & Design by Contract
Defensive Programming & Correctness Guarantees
Lecture 5 · 4 Hours · LO3
05

SmartShelf: Loan validation & overdue contracts

  • Exception handling strategies & custom exceptions
  • Checked vs unchecked exceptions
  • Design by Contract: preconditions & postconditions
  • Invariants & defensive programming
  • Interplay between exceptions and contracts
Coming soon
III

Design Patterns & Integration

Lectures 6–9 · SOLID, GoF Patterns & Project Workshop

SOLID Principles & Creational Patterns
Singleton, Factory, Builder & Prototype
Lecture 6 · 4 Hours · LO4
06

SmartShelf: Book factories & loan builders

  • Dependency Inversion & SOLID principles
  • Singleton pattern & its trade-offs
  • Factory Method & Abstract Factory
  • Builder pattern for complex objects
  • Prototype pattern & real-world motivation
Coming soon
Structural Patterns
Adapter, Composite, Decorator, Facade & Proxy
Lecture 7 · 4 Hours · LO4, LO5
07

SmartShelf: External API adapters & loan decorators

  • Interface adaptation: Adapter, Bridge, Facade
  • Composition: Composite & Decorator
  • Optimization & control: Flyweight & Proxy
  • Refactoring poorly structured code
  • Pattern selection decision framework
Coming soon
Behavioural Patterns & Anti-Patterns
Observer, Strategy, Command, State & Big Ball of Mud
Lecture 8 · 4 Hours · LO4
08

SmartShelf: Notification observers & fine strategies

  • Communication: Observer, Mediator, Chain of Responsibility
  • Actions: Command, Strategy, Template Method, State
  • Traversal: Iterator, Visitor, Memento
  • Anti-pattern: Big Ball of Mud
  • Patterns as corrective design tools
Coming soon
Integration, Project Workshop & Presentations
Synthesis, Code Review & PRES1 Preparation
Lecture 9 · 4 Hours · LO4, LO5
09

SmartShelf: Full system — all patterns integrated

  • Integrating multiple patterns cohesively
  • Guided PRAC1 project development
  • Mini code review workshop (peer evaluation)
  • Presenting technical design decisions
  • PRES1 preparation & lessons learned
Coming soon

Assessment

PRAC1 — Practical Project

Build a real-life application integrating OOP principles and multiple design patterns from the SmartShelf use case. Demonstrate working code with clear architectural decisions.

Coursework Component

PRES1 — Technical Presentation

Present your project's design rationale, pattern choices, and lessons learned. Peer evaluation and Q&A to demonstrate depth of understanding.

Presentation Component

Resources

📘

Lecture Slides

Weekly presentations with theory & code examples

💻

SmartShelf Code

Progressive codebase evolving each week

🎯

Workshop Tasks

In-class exercises mapped to lecture topics

📖

Reading List

GoF Design Patterns, Clean Code, SOLID references

Learning Path

Part I Lectures 1–2: Foundations — OOP principles revisited with a critical lens, immutability, cloning strategies, and object lifecycle management
Part II Lectures 3–5: Intermediate — Polymorphism and duck typing, generics with LSP, exception handling and Design by Contract
Part III Lectures 6–9: Design Patterns — SOLID principles, creational/structural/behavioural GoF patterns, anti-patterns, and full integration project