Skip to content

Commit a396e5e

Browse files
committed
visitor pattern changes
1 parent 7b09ae0 commit a396e5e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1933,7 +1933,7 @@ class Monkey : IAnimal
19331933

19341934
public void Accept(IAnimalOperation operation)
19351935
{
1936-
throw new NotImplementedException();
1936+
operation.VisitMonkey(this);
19371937
}
19381938
}
19391939

@@ -1946,7 +1946,7 @@ class Lion : IAnimal
19461946

19471947
public void Accept(IAnimalOperation operation)
19481948
{
1949-
throw new NotImplementedException();
1949+
operation.VisitLion(this);
19501950
}
19511951
}
19521952

@@ -1959,7 +1959,7 @@ class Dolphin : IAnimal
19591959

19601960
public void Accept(IAnimalOperation operation)
19611961
{
1962-
throw new NotImplementedException();
1962+
operation.VisitDolphin(this);
19631963
}
19641964
}
19651965
```

0 commit comments

Comments
 (0)