Skip to content

Commit

Permalink
added diagrams
Browse files Browse the repository at this point in the history
  • Loading branch information
premaseem committed Aug 2, 2018
1 parent 72268f6 commit 575937a
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 4 deletions.
28 changes: 26 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,26 @@
# DesignPatternsJava9
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.
# What is Visitor Design Pattern
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.

### Learn Design Patterns with Java by Aseem Jain
This repository contains working project code used in video Course by Packt Publication with title "Learn Design Patterns with Java " authored by "Aseem Jain".

### Course link:
https://www.packtpub.com/application-development/learn-design-patterns-java-9-video

### Repository link:
https://github.com/premaseem/DesignPatternsJava9

This repository has several branches and each branch contains code of a design pattern.
https://github.com/premaseem/DesignPatternsJava9/tree/pattern-name

### Example:
To look at code of Decorator pattern you might have to switch to branch decorator pattern link:
https://github.com/premaseem/DesignPatternsJava9/tree/decorator-pattern

### Authors blog on design patterns:
https://premaseem.wordpress.com/category/computers/design-patterns/

### Software Design pattern community face book page:
https://www.facebook.com/DesignPatternGuru/

Note: This code base will work on Java 9 and above versions.
Binary file added Visitor-Pattern-class-diagram .png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added VisitorSequenceDiagram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions patternBonus/src/com/premaseem/ClientFile.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ public static void main(String[] args) {
int repeatRunFlag = 1;
while (repeatRunFlag == 1) {
System.out.println("Which party do you want to host ");
System.out.println("press 1 for Week end party ");
System.out.println("press 2 for Week day party ");
System.out.println("press 1 for Loud party ");
System.out.println("press 2 for Silent party ");
int tvType = scan.nextInt();
if (tvType == 1) {
party = new LoudParty();
Expand Down
Binary file added visiting faculty.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added visitorPattern-generic.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 575937a

Please sign in to comment.