Skip to content

Commit 9414c84

Browse files
committed
Sample Up and Running
1 parent 7c99e44 commit 9414c84

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

src/VisitorDesignPattern/Test.java

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
package VisitorDesignPattern;
2+
3+
public class Test {
4+
5+
public static void main(String[] args)
6+
{
7+
Milk milk = new Milk(50);
8+
Pizza mgw = new Pizza(270);
9+
OtherStuff youKnow = new OtherStuff(100);
10+
11+
Visitor visitor = new TaxCalculator();
12+
milk.acceptVisitor(visitor);
13+
mgw.acceptVisitor(visitor);
14+
youKnow.acceptVisitor(visitor);
15+
}
16+
}

0 commit comments

Comments
 (0)