Software Engineering for Smart Data Analytics & Smart Data Analytics for Software Engineering
3×3 points |
---|
In the lecture you became familiar with Structural Pattern (Adapter, Bridge, Composite, Facade, [soon: Proxy]), Behavioral Pattern (Command, Observer, Strategy), and the Architectural Pattern “Model View Controller”. Next week you will learn as well about the Creational Pattern (Abstract Factory, Builder, Singleton). Knowing design pattern is essential for being productive in Object Oriented Software Construction. In addition they are not only useful for the construction of software, but as well for reading and understanding it.
Prepare the software you are about to study:
Your task is to find three design pattern in the source code (there are many more!) and be ready to explain them. Write a short text describing where to find the design pattern in the code and how it works. For each design pattern you should at least describe
Write it in your own words! Don't copy from the thousand resources you can find on the web about JHotDraw. Of course you can read them, but don't copy them. You even find explanations in the project itself e.g.in the pattlets folder.
Tips:
Tips if you are looking for more information:
CH.ifa.draw.samples.javadraw.JavaDrawApp
, …net.NetApp
, …pert.PertApplication
, …nothing.NothingApp
3 points (optional) |
---|
Mediator
defines all possible interactions between the colleagues.ConcreteMediator
then implements these interactions between the ConcreteColleagues
.ConcreteCollegue
wants to communicate with another ConcreteCollegue
they will not communicate directly, but through the ConcreteMediator
.ConcreteColleagues
but only between the ConcreteColleagues
and the ConcreteMediator
.Your task is now:
2 points (optional) |
---|
Take a look at the cyclic dependency expressed in the following UML class diagram: Can you think of a way to break this cycle without loosing any functionality?
Create a class diagram and explain the idea in two or three sentences.