diff --git a/property/README.md b/property/README.md index 0bfd89183..5eb1ddef4 100644 --- a/property/README.md +++ b/property/README.md @@ -31,6 +31,10 @@ In plain words > Define and manage a dynamic set of properties for an object, allowing customization without altering its structure. +Sequence diagram + +![Property sequence diagram](./etc/property-sequence-diagram.png) + ## Programmatic Example of Property Pattern in Java The Property design pattern, also known as Prototype inheritance, is a pattern that allows objects to be created from other objects, forming object hierarchies. This pattern is particularly useful when you want to create a new object that is a slight variation of an existing object. diff --git a/property/etc/property-sequence-diagram.png b/property/etc/property-sequence-diagram.png new file mode 100644 index 000000000..00c9ee3b7 Binary files /dev/null and b/property/etc/property-sequence-diagram.png differ diff --git a/prototype/README.md b/prototype/README.md index c68c5fbc0..0293a588b 100644 --- a/prototype/README.md +++ b/prototype/README.md @@ -35,6 +35,10 @@ Wikipedia says > The prototype pattern is a creational design pattern in software development. It is used when the type of objects to create is determined by a prototypical instance, which is cloned to produce new objects. +Sequence diagram + +![Prototype sequence diagram](./etc/prototype-sequence-diagram.png) + ## Programmatic Example of Prototype Pattern in Java In Java, the prototype pattern is recommended to be implemented as follows. First, create an interface with a method for cloning objects. In this example, `Prototype` interface accomplishes this with its `copy` method. diff --git a/prototype/etc/prototype-sequence-diagram.png b/prototype/etc/prototype-sequence-diagram.png new file mode 100644 index 000000000..fbab1beee Binary files /dev/null and b/prototype/etc/prototype-sequence-diagram.png differ diff --git a/proxy/README.md b/proxy/README.md index f237fb47e..a63069bd0 100644 --- a/proxy/README.md +++ b/proxy/README.md @@ -36,6 +36,10 @@ Wikipedia says > A proxy, in its most general form, is a class functioning as an interface to something else. A proxy is a wrapper or agent object that is being called by the client to access the real serving object behind the scenes. Use of the proxy can simply be forwarding to the real object, or can provide additional logic. In the proxy extra functionality can be provided, for example caching when operations on the real object are resource intensive, or checking preconditions before operations on the real object are invoked. +Sequence diagram + +![Proxy sequence diagram](./etc/proxy-sequence-diagram.png) + ## Programmatic Example of Proxy Pattern in Java Imagine a tower where the local wizards go to study their spells. The ivory tower can only be accessed through a proxy which ensures that only the first three wizards can enter. Here the proxy represents the functionality of the tower and adds access control to it. diff --git a/proxy/etc/proxy-sequence-diagram.png b/proxy/etc/proxy-sequence-diagram.png new file mode 100644 index 000000000..938dffc28 Binary files /dev/null and b/proxy/etc/proxy-sequence-diagram.png differ