UNC Chapel Hill COMP 301
Professor Sayeed Ghani · UNC Chapel Hill · 13 lectures with notes
Students in this class: ask your lecturer for the class code, and these lectures will already be in your library when you sign up.
UNC COMP 301 - F26/Lec 12 - Adapter Design Pattern; Composition over Inheritance; Decorator DP
Adapters reconcile incompatible APIs, while decorators add behavior through composition without multiplying subclasses.
UNC COMP 301 - F26/Lec 11 - UML; Creational Design Patterns: Singleton, Multiton, Factory
UML notation and three object-creation patterns: Singleton, Multiton, and Factory Method.
UNC COMP 301 - F26/Lec 9 - Iterator Design Pattern
Java iterators hide collection structure while enabling controlled traversal through hasNext(), next(), and custom iteration strategies.
UNC COMP 301 - F26/Lec 9 - Software Testing - JUnit; Design Patterns Introduction
JUnit tests, coverage, and TDD help verify Java behavior and reveal gaps in requirements.
UNC COMP 301 - F26/Lec 8 - Java Collections Framework - HashMap, HashSet; Error Handling
Java’s `HashMap` and `HashSet` provide fast key lookup and unique-element storage; exception handling ensures cleanup and checked-error handling.
UNC COMP 301 - F26/Lec 7 - Coupling, Composition over Inheritance; Error handling
Use inheritance for clear is-a hierarchies; otherwise favor composition, and use Java exceptions to make errors explicit and handleable.
UNC COMP 301 - F26/Lec 6 - Abstract classes; Inheritance application; Aggregation, Composition
Abstract classes enforce shared contracts without default implementations; aggregation and composition distinguish object relationships by ownership and lifetime.
UNC COMP 301 - F26/Lec 5 - Polymorphism, Type casting, Method Access, Overriding methods
Java polymorphism depends on both a reference’s declared type and its runtime object, shaping casts, method access, and dispatch.
UNC COMP 301 - F26/Lec 4 - Inheritance and Polymorphism
Java subtype polymorphism lets a Person reference hold a Student or Professor, but downcasts must match the object's runtime class.
UNC COMP 301 - F26/Lec 3 - Motivating OO; Encapsulation; Assn 01; Interfaces
Java interfaces decouple client code from concrete implementations, while encapsulation and immutability protect object state.
UNC COMP 301 - F26/Lec 2 - Maven Build; Motivating the Object Oriented Way
Maven packages Java applications as JARs; a triangle program illustrates the shift from procedural code to object-oriented design.
UNC COMP 301 - F26/Lec 1 - Intros, Syllabus, 301 Overview, Java Workflow & Maven
COMP 301 teaches principled software design and Java project workflows, with Maven managing builds, dependencies, and packaging.
UNC COMP 301 - F26/Lec 13 - Lambda Expressions; Concurrent Programming
Java threads enable concurrent tasks, but parallel speedups depend on the algorithm and available processor cores.