Tutorial 10
If you did assignment-iii, please make sure you submit it following the instructions in the spec
By Alvin
Suppose:
ResumeTemplate and gave it to everyone in the class
Think of templates from MS word
UML Diagram
generateResume is the template method that can be split into smaller "steps"Behavioural design pattern that lets you
Why use it?
What is it?
Code Demo
Model how characters in a game can move around and attack other characters
King can
Queen can
Dragon can
Suppose:
Game
Add an interface JSONExport and implement it for every class that can be exported
What if now I can't edit the source code of these classes directly?
accept method that takes a visitor visit method for each type of visitable UML Diagram
Code Demo
What is it?
Benefits
Behavioural design pattern that allow functionalities to be added to classes without needing to "open" them
When to use?
New operations need to be added to all elements of an existing object structure
Thank you all for a great term and good luck for your exams 🎉