Assignments DesignPatterns Lesson5
Assignments DesignPatterns Lesson5
Week 5 assignments
When creating the program code, you must apply the following basic principles:
• create a separate project for each assignment;
• use name ‘assignment1’, ‘assignment2’, etcetera for the projects;
• create one solution for each week containing the projects for that week;
• make sure the output of your programs are the same as the given screenshots;
Implement the Logger class, a MainSystem class, a SubSystem class, and a simple Start method that (together) generates
the output shown above. The Start method calls the logger with: logger.Log("Program", "starting"); and
creates the MainSystem object. Do not pass the logger object around!
In the classdiagram you can see how the classes relate to each other.
Design Patterns Week 5 assignments
In the Start method, create an ATM machine object containing 2000 euro, and make a loop for reading a command
(valid commands are: "insert card", "reject card", "enter pincode", "withdraw cash"). When the user enters "stop", the
program ends.
void Start() {
ATMMachine machine = new ATMMachine(2000);
// loop...
}