23T3 Week 9
Monday 11AM - 2PM (M11B)
Wednesday 12PM -3PM (W12A)
Slides by Alvin Cherk (z5311001)
No blogs, no marks. (Including access, layout, MRs).
Week 10 Tute: Kahoot & Revision. Email me if you want to cover something specific.
Week 10 Lab: Sample Exam dry-run using exam environment
What kind of design pattern is it?
Behavioural
What kind of design pattern is it?
Structural
Adding behaviour to an object, without opening the object up (i.e., rewriting its contents) and changing it.
public interface Component {
void doOperationA();
void doOperationB();
}
public class ConcreteComponent implements Component {
@Override
void doOperationA();
@Override
void doOperationB();
}
public abstract class Decorator implements Component {
private Component cc;
}
public class ConcreteDecoratorX extends Decorator {}
Template