Save this video — free

[HD] EECS4302 F26 - 2026-10-08 (Thursdsay) - Lecture 9

Jackie Wang · 1:16:59 · Watch on YouTube

[HD] EECS4302 F26 - 2026-10-08 (Thursdsay) - Lecture 9 Watch on YouTube →

Overview

EECS4302 Lecture 9 develops the Composite pattern in Java through four design attempts, showing how to prevent invalid operations, eliminate duplicated collection code with generics, and handle Java’s restriction against extending multiple classes. It traces recursive price calculation using polymorphism and dynamic binding, then introduces the Visitor pattern through expression-tree operations and the cohesion, single-choice, and open-closed principles.

Key takeaways

Chapters

0:00 UML Arrows: Inheritance and Client–Supplier Relationships
7:00 Selecting Design Diagrams for Reports and Exam Practice
13:00 Composite Attempt 1: Recursive Equipment and the Invalid Add Method
19:00 Composite Attempt 2: Restricting Children to Composite Equipment
22:00 Attempt 2’s Code Duplication Across Recursive Systems
27:00 Attempt 3: Generics Meet Java’s Single-Class Inheritance Rule
31:00 The Diamond Problem and Ambiguous Inherited Methods
36:30 Final Composite Design: Generic Abstract Class Plus Equipment Interface
41:30 Uniform Price Access for Base and Composite Equipment
49:00 Dynamic Binding Selects Recursive or Base Price Calculation
54:00 Building and Tracing a Cabinet Equipment Tree
1:00:00 Visitor Motivation: Operations on an Expression Tree
1:03:00 Why Putting Every Expression Operation in Every Node Scales Poorly
1:08:00 Cohesion and the Single-Choice Principle
1:13:00 Open–Closed Choices for Expression Structure and Operations

Keep these chapters and the full searchable transcript in your own library.

Summary, takeaways, and chapters were generated by AI from the video's transcript and may contain errors. The video belongs to its creator, Jackie Wang.

Want the full transcript?

Save this video in YouTube Collector to get its complete searchable transcript, your own AI summaries, and a library that keeps every video you collect in one place.