diff --git a/poison-pill/README.md b/poison-pill/README.md index 31921326e..5e9e690cb 100644 --- a/poison-pill/README.md +++ b/poison-pill/README.md @@ -29,6 +29,10 @@ In plain words > Poison Pill is a known message structure that ends the message exchange. +Sequence diagram + +![Poison Pill sequence diagram](./etc/poison-pill-sequence-diagram.png) + ## Programmatic Example of Poison Pill Pattern in Java In this Java example, the Poison Pill serves as a shutdown signal within message queues, demonstrating effective thread management and consumer communication. @@ -210,10 +214,6 @@ Program output: 07:43:01.520 [Thread-0] INFO com.iluwatar.poison.pill.Consumer -- Consumer CONSUMER_1 receive request to terminate. ``` -## Detailed Explanation of Poison Pill Pattern with Real-World Examples - -![Poison Pill](./etc/poison-pill.png "Poison Pill") - ## When to Use the Poison Pill Pattern in Java Use the Poison Pill idiom when: diff --git a/poison-pill/etc/poison-pill-sequence-diagram.png b/poison-pill/etc/poison-pill-sequence-diagram.png new file mode 100644 index 000000000..9976f2cc6 Binary files /dev/null and b/poison-pill/etc/poison-pill-sequence-diagram.png differ diff --git a/presentation-model/README.md b/presentation-model/README.md index 9b0eb6659..df191ddb6 100644 --- a/presentation-model/README.md +++ b/presentation-model/README.md @@ -33,7 +33,6 @@ Architecture diagram ![Presentation Model Architecture Diagram](./etc/presentation-model-architecture-diagram.png) - ## Programmatic Example of Presentation Model Pattern in Java The Presentation Model design pattern is a pattern that separates the responsibility of managing the state and behavior of the GUI in a separate model class. This model class is not tied to the view and can be used to test the GUI behavior independently of the GUI itself. diff --git a/private-class-data/README.md b/private-class-data/README.md index 18dd48053..fe9bc08e0 100644 --- a/private-class-data/README.md +++ b/private-class-data/README.md @@ -33,6 +33,14 @@ Wikipedia says > Private class data is a design pattern in computer programming used to encapsulate class attributes and their manipulation. +Mind map + +![Private Class Data mind map](./etc/private-class-data-mind-map.png) + +Flowchart + +![Private Class Data flowchart](./etc/private-class-data-flowchart.png) + ## Programmatic Example of Private Class Data Pattern in Java Imagine you are cooking a stew for your family dinner. You want to stop your family members from tasting the stew while you're still preparing it. If they do, there might not be enough stew left for dinner. diff --git a/private-class-data/etc/private-class-data-flowchart.png b/private-class-data/etc/private-class-data-flowchart.png new file mode 100644 index 000000000..2af3e1a6c Binary files /dev/null and b/private-class-data/etc/private-class-data-flowchart.png differ diff --git a/private-class-data/etc/private-class-data-mind-map.png b/private-class-data/etc/private-class-data-mind-map.png new file mode 100644 index 000000000..adfaa6abb Binary files /dev/null and b/private-class-data/etc/private-class-data-mind-map.png differ