UNC Chapel Hill COMP 301
Professor Sayeed Ghani · UNC Chapel Hill · 22 lectures with notes
Every lecture with its full transcript and chapters, and one search across all 22 lectures.
UNC COMP 301 - F26/Lec 23 (Last) - Testing Principles and phases; Debugging (stack trace)
Reliable tests isolate dependencies, verify both success and failure, and make randomness repeatable with fixed seeds.
UNC COMP 301 - F26/Lec 21 - MVC Playlist Views; SOLID Design Principles
A JavaFX playlist walkthrough leads into SOLID, with SRP and OCP illustrated through report-card and ticket-pricing designs.
UNC COMP 301 - F26/Lec 22 - SOLID Design Principles (Cont.); Testing revisited
SOLID principles in Java: use abstractions and dependency injection to support safer extension, substitution, and testing.
UNC COMP 301 - F26/Lec 20 - MVC (Cont.) - Songs Playlist example
A JavaFX playlist demonstrates how MVC, Observer notifications, and controller validation work together.
UNC COMP 301 - F26/Lec 19 - MVC (Cont.)
MVC separates state, rendering, and event handling, with classic and alternate architectures differing in how views access model updates.
UNC COMP 301 - F26/Lec 17 - JavaFX (part 2)
JavaFX UI structure, scene switching, layout panes, IntelliJ setup, and reusable CSS styling.
UNC COMP 301 - F26/Lec 16 - JavaFX (part 1)
JavaFX interfaces combine a Stage, Scene, and pane hierarchy, while button events are handled concisely with lambdas and setOnAction.
UNC COMP 301 - F26/Lec 15 - Observer (part 2); Lambda exp. and Anonymous classes; JavaFX Intro.
Java Observer pattern variations lead into lambda expressions, anonymous classes, and a practical JavaFX setup.
UNC COMP 301 - F26/Lec 14 - Race conditions, Synchronized methods; Observer Design Pattern
Java synchronization prevents shared-counter races, while the Observer pattern sends game updates to registered fans.
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.
UNC COMP 301 - F26/Lec 11 - UML; Creational Design Patterns: Singleton, Multiton, Factory
UML makes class relationships visible, while Singleton, Multiton, and Factory Method control how objects are created.
UNC COMP 301 - F26/Lec 12 - Adapter Design Pattern; Composition over Inheritance; Decorator DP
Adapters translate incompatible APIs, while decorators add behavior through composable wrappers instead of subclass proliferation.
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 8 - Java Collections Framework - HashMap, HashSet; Error Handling
HashMap and HashSet provide fast key lookup and unique elements, while Java exception handling requires deliberate cleanup and checked-exception handling.
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 6 - Abstract classes; Inheritance application; Aggregation, Composition
Abstract classes enforce shared contracts without requiring a default implementation, while aggregation and composition model different kinds of object ownership.
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 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 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 3 - Motivating OO; Encapsulation; Assn 01; Interfaces
Java objects become safer and more flexible when their state is encapsulated and clients depend on interfaces rather than implementations.
UNC COMP 301 - F26/Lec 1 - Intros, Syllabus, 301 Overview, Java Workflow & Maven
COMP 301 focuses on principled software design, with a practical introduction to Java compilation, dependencies, and Maven.
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.