Software Engineering for Smart Data Analytics & Smart Data Analytics for Software Engineering
Release date: Wednesday, 03.06.15 - Due date: Sunday, 07.06.15, 23:59
If you like doing Task 31 and Task 32 based on Java (You can do the non-optinal part without!). You should check out:
4 points |
---|
In the lecture we explained that we do not consider a good decision to let the class Stack be a subtype of List (or AbstractList). Repeat the argument and demonstrate the problem with a short program.
8 points |
---|
The following class diagrams sketches how we could model the recipes for our baked goods:
The baked good has a recipe, that knows the required ingredients and is able to instruct the supplies to release the required ingredients and the oven to process the ingredients.
After a while working with this model we realized that the machine should become able to use recipes as well as components for other recipes. (Example: Bake two parts of a cake separately and the combine it.)
Change the model by introducing the composite pattern to account for recipes that have recipes as components. Give the implementation of totalIngredients()
and produce(Oven, Supplies)
in pseudo code or as part of our Java code. So, you either deliver a UML diagram with some pseudo code for the two methods or the pattern implemented in A08T31_CloudBakery2100StationModel
.
8 [+8] points |
---|
[If you do b) you don't need to do a) as long as you could sketch the class diagram on demand to the tutor.]
a) In our current implementation we have to press a “Refresh” button on the “Station Simulation” to retrieve the current changes. Of course it would be better, if the the table just changes as soon as new orders arrive. We suggest to realize this by having an observer pattern between the server and a controller in the station simulation. Plus, an observer pattern between this controller and the UI.
Create a class diagram plus some pseudo code to illustrate this collaboration.
b) (optional) Implement this two observer mechanisms.
Two technical tips for the observer between client and server:
UnicastRemoteObject.exportObject(<YourClientObserver>, 0)
to make your observer instance on the client accessible to the server.Display.getDefault().asyncExec(new Runnable() { public void run() { observer.onOrderPlaced(order); } });
8 points |
---|
One understanding of the word “pattern” is, that it describes a useful collaboration of certain classes, that occurs a few times in software systems.
Look through our code to find a pattern in the sense of a re-occuring collaboration.
If you need a suggestion, click here
If you need even more precise suggestions, click here
LoginController
, CustomerLogin
, and CustomerSession
and the collaboration of RegistrationController
, StationRegistry
, and StationSession
.CustomerApplication.createApplicationWindow()
and see how XyzController
collaborates with XyzView
and maybe other classes like other controllers or the CustomerApplication
. You may as well continue starting from StationApplication.createApplicationWindow()
.getBakedGoodNames()
and getStationNames()
in OrderController.View
and how the methods in these subclasses work together.Describe this collaboration in a few sentences plus a class diagram.