Student name:
Student number:
Examination cover sheet
(to be completed by the examiner)
Course name: Software specification and architecture
Course code: 2IW81
Date: 12-04-2016
Start time: 09:00
End time : 12:00
Number of pages: 11
Number of questions: 5
Maximum number of points/distribution of points over questions:100
Method of determining final grade: divide total of points by 10
Answering style: multiple choice questions; open questions
Exam inspection: With your instructor
Other remarks: It is not allowed to use study materials or a computer during the exam.
The examination questions have been inspected by Julien Schmaltz, Kees Huizing, Anton Wijs, Loek
Cleophas, and Serguei Roubstov.
Instructions for students and invigilators
Permitted examination aids (to be supplied by students):
Notebook
Calculator
Graphic calculator
Lecture notes/book
One A4 sheet of annotations
Dictionar(y)(ies). If yes, please specify:
Other:
Important:
• examinees are only permitted to visit the toilets under supervision
• it is not permitted to leave the examination room within 15 minutes
of the start and within the final 15 minutes of the examination,
unless stated otherwise
• examination scripts (fully completed examination paper, stating
name, student number, etc.) must always be handed in
• the house rules must be observed during the examination
• the instructions of examiners and invigilators must be followed
• no pencil cases are permitted on desks
• examinees are not permitted to share examination aids or lend them
to each other
During written examinations, the following actions will in any case be
deemed to constitute fraud or attempted fraud:
• using another person’s proof of identity/campus card (student identity card)
• having a mobile telephone or any other type of media-carrying device on your desk or in your clothes
• using, or attempting to use, unauthorized resources and aids, such
as the internet, a mobile telephone, etc.
• using a clicker that does not belong to you
• having any paper at hand other than that provided by TU/e, unless
stated otherwise
• visiting the toilet (or going outside) without permission or supervision
Associated with the Central Examination Regulations
TECHNISCHE UNIVERSITEIT EINDHOVEN
Department of Mathematics and Computer Science
Examination Software specification and architecture
Tuesday, April 12th 2016, 09h00 – 12h00.
Your answers must be formulated and written down clearly. First read ALL questions once!
This examination consists in two parts: the first part is composed of 20 multiplechoice questions. Each question gives you 2 or 0 points. The second part is composed
of 4 exercises worth 20 points each. You need to complete at least 3 of these
exercises.
Students following 2IHS10 need to address questions 1 to 12 and the first two
exercises (exercise A and exercise B).
Multiple Choice Questions (40 points)
Answer the following multiple-choice questions. Each question has only one correct
answer. You should encircle your answer. For each question, you will get 2 points
if you circled the correct answer; 0 point otherwise.
Question 1
Consider the statement "The system shall be able to process up to 40 executing
jobs at a time". Among the four options below, select the best formulation for this
statement as a requirement:
a. The system shall not be able to process more than 40 jobs at a time.
b. The system shall process jobs up to 40 simultaneous jobs.
c. The system shall be able to process jobs up to 40 simultaneous jobs.
d. The system shall process typically 40 jobs at a time.
Question 2
Select from the requirements below, the one that is S.M.A.R.T.
a. The system shall start quickly.
b. The system shall start in a few seconds.
c. The system shall start within 4 seconds.
d. The system shall start as fast as possible.
1
Question 3
Select the answer below that best describes the relation between the three use-cases
– A, B, and C – below:
a. Use-case A always executes use-case B and always executes use-case C.
b. Use-case A always executes use-case B and sometimes
executes use-case C.
c. Use-case A sometimes executes use-case B and always
se-case executes C.
d. Use-case A sometimes executes use-case B and sometimes executes use-case C.
Question 4
Which of the following statements pertaining to actors in use-cases is "FALSE"?
a. In presence of generalization a more general actor can always replace the specialized one.
b. One user might be represented by multiple actors in the same use-case.
c. Actor is a class of entities falling beyond the system boundaries and interacting
with the systems.
d. One use-case might involve multiple actors.
Question 5
Consider the class diagram below composed of 3 classes, namely, A, B, and C.
Which of the following statements about this class diagram is "TRUE":
a. When an instance of A is deleted, all instances of B are deleted. Instances of C are
unchanged.
b. When an instance of A is deleted, all instances of B created by A are deleted. Instances of C are unchanged.
c. When an instance of A is deleted, all instances of B created by A are deleted. Instances of C are deleted as well.
d. When an instance of A is deleted, instances
of B and C are unchanged.
2
Question 6
Consider the class diagram below composed of 3 classes, namely, company, role,
and contract. Note that no multiplicity means a multiplicity of 1. Which of the
following statements about this class diagram is "TRUE":
a. Every company can have only one contract.
b. Every company can play only one role per contract.
c. Every contract can be associated to only one company.
d. Every company can have multiple roles within one
contract.
Question 7
Consider the class diagram below composed of 2 classes, namely, A and B. Which
of the following statements about this class diagram is "TRUE":
a. A is a generalization of B.
b. A is a composition of B.
c. B is an implementation of A.
d. B is a generalization of A.
Question 8
Consider the class diagram below composed of 2 classes, namely, plane and flight.
Which of the following statements about this class diagram is "TRUE":
a. One flight can be assigned only to zero or one planes.
b. One flight can be assigned to any number of planes.
c. One plane can be assigned only to zero or one flight.
d. One plane must be assigned to at least one flight.
Question 9
Consider the sequence diagram below composed of 2 instances of classes A and B.
Which of the following statements about this class diagram is "TRUE":
3
a. Method1 must be implemented by class B.
b. Method1 must be implemented by class A and B.
c. Method1 must not be implemented by A nor by B.
d. Method1 must be implemented by class A.
Question 10
Consider the sequence diagram below composed of 3 class instances, namely, A, B,
and C. Which of the following statements is not enforced by the sequence diagram:
a. m1 is received before m2 is sent.
b. m2 is received before m3 is sent.
c. m1 is sent before m2 is sent.
d. m2 is sent before m3 is sent.
Question 11
In the activity diagram below, which one of the executions (to completion) is not
possible?
a. A completes then C completes. B starts but
is killed.
b. B completes then C completes. A starts but
is killed.
c. A and B complete, C completes once.
d. A and B complete, then C completes twice.
Question 12
Consider the UML state machine below. Consider the sequence of events: e1, e3,
e4, e5, e2. What state is reached at the end of this sequence?
4
e1
1
2
a. 1
H
b. 2
e2
c. 3
e3
e5
d. 4
3
e4
4
Question 13
Consider a traffic light. Whenever the light becomes green, it remains green until
it becomes orange. It might remains orange for some time before it eventually
becomes red. Which of the following LTL formulas expresses this statement?
a. G(green −→ green U (orange U red )
b. G(green U orange U red )
c. G(green −→ X(green U (orange U red ))
d. G(green −→ X(green U (orange ∧ (orange U red )))
Question 14
Consider a printer. A user can access the printer by sending a req signal to the
printer. The printer will grant access to its services by responding with an ack
signal. A requirement of the printer is to be fair, that is, it eventually serves all
requests. Which of the following LTL formulas expresses this statement?
a. G(req U ack )
b. G(req −→ Fack )
c. G(req −→ ack )
d. GF(req ∧ ack )
5
Question 15
Consider the Labelled Transition System (LTS) below over atomic propositions a
and b. Which of the following LTL properties holds for this LTS?
a. GFb
b. FGb
c. Ga
d. Gb
Question 16
Which statement about the notion of "Time convergent sequences" of Timed Automata is "TRUE"?
a. Time convergent sequences are flaws in model.
b. Time convergent sequences come from zeno paths.
c. Time convergent sequences cannot be avoided.
d. Time convergent sequences are only present in models with timelocks.
Question 17
Which statement defines the notion of "Timelock" in the theory of Timed Automata?
a. A Timed Automaton has a timelock in state s if and only if there are no zeno
paths starting from state s.
b. A Timed Automaton has a timelock in state s if and only if there are no infinite
sequences starting from state s.
c. A Timed Automaton has a timelock in state s if and only if there are no time
divergent sequences starting from s.
d. A Timed Automaton has a timelock in state s if and only if there are no time
convergent sequences starting from s
6
Question 18
Consider the Timed Automaton below over atomic propositions start and stop and
clock x. The initial state is state number 0. Select the statement below that holds
for this Timed Automaton
a. This timed automaton has a
timelock.
b. This timed automaton has a
zeno path.
c. The time spent in state 1 is
at least 2 time units and at
most 5 time units.
d. When in state 1, a stoptransition always takes place
when clock x equals 2.
Question 19
Which stakeholders are addressed by the process view of the 4+1 Views model of
Kruchten:
a. end-users
b. programmers
c. system integrators
d. system engineers
Question 20
The Gnutella protocol is an open decentralized group membership and search protocol. Gnutella has been designed to operate in a dynamic environment, where hosts
can join and leave the network frequently. Furthermore, Gnutella is expected to be
scalable and reliable, that is, external attacks should not cause significant data or
performance loss. Which one of the following architectural styles would you apply
if you would be designing Gnutella?
a. Blackboard
b. Client-server
c. Peer-to-peer
d. Mobile code
7
Exercises (60 points)
The second part of the examination consists in four exercises, 20 points each. You
should answer at least three of these exercises. Please read all exercises first, choose
the ones you are most comfortable with.
Should you decide to answer four exercises, we will consider the three best solutions.
Please, keep in mind that three correct solutions will give you more points than four
wrong ones!
Exercise A (Class Diagram)
An internet shop sells items via shopping carts. Customers have a name, delivery
address, email address, and preferred payment strategy (see below). A customer
has at most one shopping cart to which he/she can add and remove items. When
finished with shopping, the customer takes the cart to checkout. There are several
payment strategies (credit card, Paypal, iDeal) that can be chosen (or changed) at
checkout. After successful checkout, an order is created that is kept in a list of
standing orders, until the order is delivered.
Write a class diagram that models the internet shop described above. Pay attention
to multiplicities. Do not add attributes for references that are drawn as relations
(arrows representing association, etc.). Do not add getter and setter methods for
attributes.
Exercise B (General UML diagrams)
Consider a software system supporting the work process of the TU/e Bureau for
Computer Facilities (BCF). This bureau handles purchase laptop requests from
employees. A case worker within BCF receives that request and monitors it until it
is ordered and received. Case workers process the requests for laptops under 1 500
Euro’s, write a purchase order, and then send it to the approved vendor. Purchase
requests over 1 500 Euro’s must first be sent out for a bid from the vendor that
supplies the product. When the bids return, the case worker selects one bid. Then,
the case worker writes a purchase order to be sent to the approved vendor. Once
a laptop is received, BCF workers need to register it for easy network access and
administrative purposes (who has which laptop). BCF also creates a special BCF
account on every laptop for remote maintenance. It might happen that a laptop is
given to its user before it is properly registered (say, the MAC address has not been
registered). In that case, the software system will automatically send reminders to
BCF workers to complete the laptop registration.
a. (6 points) Draw a use case diagram for the BCF software system. In addition,
give a detailed scenario (pre-condition, trigger, post-condition, main scenario,
alternatives) of one of the use cases of your use case diagram.
8
b. (6 points) Based on the description of your scenario, draw an activity diagram
for it.
c. (6 points) Based on the description of this scenario, draw a sequence diagram
for it.
d. (2 points) informally argue about the consistency between the different diagrams.
9
Figure 1: Paper producer machine.
Exercise C (LTL and TA)
Consider the system shown in Figure 1. It is composed of a Machine, a coffee
craving Person, and an Observer. The Machine is a coffee machine accepting coins
as input and producing coffee. As you can see from the Timed Automaton of the
Person, the Person repeatedly (tries to) insert a coin, (tries to) extract coffee after
which (s)he will make a publication. Between each action the person requires a
suitable time-delay before being ready to participate in the next one. The machine
takes some time for brewing the coffee and will time-out if coffee has not been taken
before a certain upper time limit.
As a requirement we want the overall behaviour to ensure that the indicated Observer experiences a constant flow of publications from the system. In particular
we want the Observer to complain if at any time more than 8 time-units elapse
between two consecutive publications.
a. (8 points) Create a Timed Automaton modelling the Machine and a Timed
Automaton modelling the Observer. The objective is to insert state labels to
all these models so that it is possible to express the following properties. You
must also formalise those properties in LTL:
(a) The Observer never complains.
(b) If a coin has been inserted and next coffee has been received, a publication
will eventually follow.
(c) If a coin has been inserted, coffee is eventually produced.
10
b. (2 points) Do the models have timelock or zeno paths? Motivate your answer.
c. (10 points) In the previous you formalised three properties. Do they hold ?
If yes, justify your answer. If not, please provide a counter-example to each
property. A counter-example is a finite trace so that at the end of the trace
the property is violated. If the properties do not hold, correct your models.
Explain the motivation for your changes.
11
Exercise D (Architecture)
(David Parnas, 1972) The KWIC ("keyword in context") index system accepts an
ordered set of lines, each line is an ordered set of words, and each word is an ordered
set of characters. Any line may be "circularly shifted" by repeatedly removing the
first word and appending it at the end of the line. The KWIC index system outputs
a listing of all circular shifts of all lines in alphabetical order. For example, given
the following lines as the input:
Programming methods
Software specification and architecture
Software engineering
KWIC can be expected to produce the following output:
and architecture Software specification
architecture Software specification and
engineering Software
methods Programming
Programming methods
Software engineering
Software specification and architecture
specification and architecture Software
While full-text search is possible these days instead, a KWIC index system may
still be used in e.g. a search engine to show the context of a queried keyword in a
search results.
Your goal is to define a software architecture for the KWIC system.
a. (5 points) Decide on the functional blocks needed for this system.
b. (5 points) Select an architecture style to map these functional blocks to an
architecture. Why and how would you use this style?
c. What are the advantages and the disadvantages of your architecture? Consider
how your architecture accommodates
(a) (2 points) changes in data representation (e.g., circular shifts are stored
as separate entities or lines are stored only as they have been entered and
shifts are indicated using an index),
(b) (2 points) changes in the algorithm (e.g., lines can be shifted as they are
read or after all lines have been read and sorting can be done incrementally),
12
(c) (2 points) new functionality being added (e.g., removal of so-called ‘stop
words’ such as "and" or "the", or adding/removing case-sensitivity),
(d) (2 points) huge amounts of data to process,
(e) (2 points) the need to reuse some of the KWIC components as building
blocks for a different system?
13
© Copyright 2026 Paperzz