Skip to content

Commit 575937a

Browse files
committed
added diagrams
1 parent 72268f6 commit 575937a

File tree

6 files changed

+28
-4
lines changed

6 files changed

+28
-4
lines changed

README.md

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,26 @@
1-
# DesignPatternsJava9
2-
This repo consists Gang of Four Design patterns code on Java 9. Each branch in the repository has code of 1 design pattern. Switch repository to try out different design patterns.
1+
# What is Visitor Design Pattern
2+
Visitor design pattern uses a visitor class which changes the executing algorithm of an element class. By this way, execution algorithm of element can vary as and when visitor varies.
3+
4+
### Learn Design Patterns with Java by Aseem Jain
5+
This repository contains working project code used in video Course by Packt Publication with title "Learn Design Patterns with Java " authored by "Aseem Jain".
6+
7+
### Course link:
8+
https://www.packtpub.com/application-development/learn-design-patterns-java-9-video
9+
10+
### Repository link:
11+
https://github.com/premaseem/DesignPatternsJava9
12+
13+
This repository has several branches and each branch contains code of a design pattern.
14+
https://github.com/premaseem/DesignPatternsJava9/tree/pattern-name
15+
16+
### Example:
17+
To look at code of Decorator pattern you might have to switch to branch decorator pattern link:
18+
https://github.com/premaseem/DesignPatternsJava9/tree/decorator-pattern
19+
20+
### Authors blog on design patterns:
21+
https://premaseem.wordpress.com/category/computers/design-patterns/
22+
23+
### Software Design pattern community face book page:
24+
https://www.facebook.com/DesignPatternGuru/
25+
26+
Note: This code base will work on Java 9 and above versions.

Visitor-Pattern-class-diagram .png

297 KB
Loading

VisitorSequenceDiagram.png

148 KB
Loading

patternBonus/src/com/premaseem/ClientFile.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ public static void main(String[] args) {
1313
int repeatRunFlag = 1;
1414
while (repeatRunFlag == 1) {
1515
System.out.println("Which party do you want to host ");
16-
System.out.println("press 1 for Week end party ");
17-
System.out.println("press 2 for Week day party ");
16+
System.out.println("press 1 for Loud party ");
17+
System.out.println("press 2 for Silent party ");
1818
int tvType = scan.nextInt();
1919
if (tvType == 1) {
2020
party = new LoudParty();

visiting faculty.JPG

129 KB
Loading

visitorPattern-generic.jpeg

278 KB
Loading

0 commit comments

Comments
 (0)