Final Exam SE-2 (Design)
Final Exam SE-2 (Design)
Final Exam SE-2 (Design)
Sascha Alda
Final Exam
Your Name:
Student ID:
Signature
You are not allowed to use any materials (e.g. books or a script). But you can use a
translator.
You need at least 40 points to pass the final exam. The final exam takes 90 minutes.
Grade
Name:
Student ID
A company asks you to analyse the following UML-based Use Case Model of a Booking
System, which can be used through a Web-based user interface:
Booking System
Accounting SAP FI / CO
Clerk
Some further details are given that you should consider for the analysis:
• Within the use case “Store And Load an Invoice”, an entity of type Invoice is creat-
ed during the partial process of storing that entity to the external system.
• The external system only accepts the asynchronous call store(d : Invoice) for
storing Invoices. After the completion of the storage, an asynchronous call back mes-
sage status(m : Message) is returned indicating the status of that operation.
• The accounting clerk is associated with a new Invoice object during the use case
“Store And Load an Invoice”. An accounting clerk may enter many Invoice objects,
while an Invoice object can only be entered by exactly one accounting clerk.
Your tasks:
a.)
Please analyse the given use case model by modelling an UML-based class diagram.
Your classes should also provide appropriate stereotypes. Please do also add relation-
ships between the classes and cardinalities, if any. (10 Points).
b.)
Please model a UML-based sequence diagram that models one scenario for entering
and storing one new Invoice object. This sequence diagram should be based on the
class diagram from assignment 1a.). Please use synchronous interactions only unless
otherwise indicated or necessary. (10 Points)
2
Name:
Student ID
3
Name:
Student ID
b.)
Consider again the problem statement given in assignment no. 1 and the class diagram
that you have produced in assignment 1a.). Please provide a module view of the result-
ing software architecture by using a UML-based package diagram. This module view
should be based on the layer architecture pattern. Please do also indicate the most im-
portant dependency relationships between the UML packages. Give concrete names to
the UML packages that could later on used as names for concrete Java packages. The
names should start with org.vgu.se. Please also insert the relevant classes into the
UML packages.
c.)
Describe two typical activities when developing a software architecture. For description,
use 2 through 3 complete sentences.
4
Name:
Student ID
ECM
<<interface>>
CADInterface
+ saveDoc( d : Doc ) : bool + storeFragment( x : eXML ) :
Status
ECMAdapter
- alt : ECM
Which of the aspects of the class diagram do you observe as critical? Please elabo-
rate shortly each observation in one sentence. Please also mark your observations in
the model (e.g. by underlining the observation). (6 Points)
5
Name:
Student ID
b.)
Please convert this UML-based method signature into a Java-based method signature:
c.)
The Web-based user interface should contain two different views for the accounting
clerk. First, a view for displaying a history of transactions that were performed during the
last month. Second, a view for displaying open invoices that were not payed by custom-
ers. A class called “ViewManager” should be responsible to notify these views upon the
arrival of events (e.g., a new transaction, or a new open invoice). It should be possible to
register and to unregister views into the “ViewManager” class in a flexible way during
runtime. Since views should not be overstrained with too many events, views should load
the necessary data from these events on demand after having received a notification.
The “ViewManager” class should be decomposed into two classes: one for managing
the views, one for providing an interface for loading new transactions and new open in-
voices. To load transactions and invoices, only one method should be used:
load() : List<DataItem>
Each view should also have an ID, which can be set from an external class.
Which design pattern would you use to solve this problem statement? Please indicate
only the name first:
Please do also model a UML-based class diagram as a solution based on the identified
design pattern. Your class diagram should include all methods including their signatures
and their access modifiers as well as the attributes including their access modifiers.
6
Name:
Student ID
dddd
7
Name:
Student ID
@Before
public void setUp() throws Exception {
in3 = new Invoice(3);
}
@Test
public void testFirst() {
con.add( new Invoice(1) );
assertEquals( 1, con.size() );
@Test
public void testSecond() {
Invoice in1 = new Invoice(1);
Invoice in2 = new Invoice(2);
Invoice in3 = in1;
this.in3 = in2;
8
Name:
Student ID
Please provide the source codes for the comments that are given in that JUnit test case.
You don’t have to repeat the names of the test methods, just provide the assertions:
Assignment 4a):
9
Name:
Student ID
Assignment 4b):
Assignment 4c):
Explain the difference between a Black Box and a White Box test. Also, give a short an-
swer to the following question: what is the drawback of having a separate test class
when performing a White Box test?
10