Read the prompt: A book may contain many chapters and each chapter may contain many sections. It is asked to create a digest for all the books in a library. A digest for a book includes a summary for the whole book, a summary for each chapter, and a summary for each section. You are asked to use one structural design pattern and one behavioral design pattern to develop this book digesting system. Instructions: Question 1:What design patterns would be the best fit? Pick 2 from this list (one structural design pattern and one behavioral design) Composite ⦁ Decorator ⦁ Filter ⦁ Interface+Abstract Class ⦁ Dynamic Linkage ⦁ Chain-of-Responsibility ⦁ Visitor ⦁ Proxy ⦁ Façade ⦁ Mediator ⦁ State ⦁ Null Object ⦁ Template method ⦁ State ⦁ Read-only Interface ⦁ Command ⦁ Flyweight ⦁ Snapshot ⦁ Dynamic Linkage ⦁ Observer ⦁ Cache Management ⦁ Façade NOTE: I picked template and composite
Read the prompt:
A book may contain many chapters and each chapter may contain many sections. It is asked to create a digest for all the books in a library. A digest for a book includes a summary for the whole book, a summary for each chapter, and a summary for each section. You are asked to use one structural design pattern and one behavioral design pattern to develop this book digesting system.
Instructions:
Question 1:What design patterns would be the best fit?
Pick 2 from this list (one structural design pattern and one behavioral design)
Composite
⦁ Decorator
⦁ Filter
⦁ Interface+Abstract Class
⦁ Dynamic Linkage
⦁ Chain-of-Responsibility
⦁ Visitor
⦁ Proxy
⦁ Façade
⦁ Mediator
⦁ State
⦁ Null Object
⦁ Template method
⦁ State
⦁ Read-only Interface
⦁ Command
⦁ Flyweight
⦁ Snapshot
⦁ Dynamic Linkage
⦁ Observer
⦁ Cache Management
⦁ Façade
NOTE: I picked template and composite
Question 2: Please provide the UML class diagram design for the two design chosen above. No explanation is needed
Step by step
Solved in 2 steps with 3 images