Javier Gonzalez-Sanchez | CSE360 | Summer 2018 | 5 Definition • Design patterns are solutions to software design problems you find again and again in real-world application development. • Patterns are about reusable designs and interactions of objects. • The 23 Gang of Four (GoF) patterns are generally considered the foundation for all other patterns (Gamma, Helm, Johnson, and Vlissides).
Javier Gonzalez-Sanchez | CSE360 | Summer 2018 | 21 Student import java.util.Observable; import java.util.Observer; public class Student implements Observer { public String answerQuestion (String question) { return "I am thinking about \'" + question +"\'"; } @Override public void update(Observable o, Object arg) { String x = ((Tutor)o).getQuestion(); String y = this.answerQuestion(x); System.out.println(y); } }
CSE360 – Introduction to Software Engineering Javier Gonzalez-Sanchez [email protected] Summer 2017 Disclaimer. These slides can only be used as study material for the class CSE360 at ASU. They cannot be distributed or used for another purpose.