April 2019
Intermediate to advanced
360 pages
9h 17m
English
To demonstrate the chain of responsibility design pattern, we will use the university email scenario briefly mentioned in the previous section. For our example, we design a system that takes incoming emails and searches for specific keywords to help determine which university team the email should be routed to. Specifically, we will account for the following:
| Keywords | University Team | Java Handler |
| academic | Academic Team | AcademicEmailHandler() |
| alumni, transcript | Alumni Affairs | AlumniEmailHandler() |
| advising, schedule, course | Advising Staff | AdvisingEmailHandler() |
| financial, student aid, tuition | Finance Staff | FinanceEmailHandler() |
| career, job, faculty | Human Resources | HREmailHandler() |
| other | Admin Team | AdminEmailHandler() ... |
Read now
Unlock full access