TM354-Final-Other-Spring21-22-Key
TM354-Final-Other-Spring21-22-Key
Date: 01/June/2022
Number of Pages: 6 Time Allowed: 2 Hours
including this cover sheet
Instructions:
1- This Final Exam has three parts that are worth 100 marks, where you should
attempt all questions.
2- Write your answer in the answer booklets. Answers given on the exam paper
will not be marked.
3- Student handbooks are NOT permitted in this examination.
4- The use of electronic devices that could have a memory is NOT permitted.
5- At the end of the examination, check that you have written your student ID, name
and your section number on the first page.
2. To which non-functional requirement would you categorize “The product should use a
lot of animation”
a. Usability requirements c. Look-and-feel requirements
b. Environmental requirements d. Maintainability requirements
5. Systems that are old, critical to the business, difficult to maintain and still being used
are known as
a. Boundary Systems c. Modular Systems
b. Efficient Systems d. Legacy Systems
1. Calculate the Cyclomatic complexity and the CBO (Coupling-between-objects) for the
following piece of code (IMPORTANT: show how each value was calculated):
[10 Marks]
public class AOUFinder {
public int counter() {
File filename = new File("TM354.txt");
String temp;
int value = 0;
try {
BufferedReader br = new BufferedReader(new FileReader(filename));
while ((temp = br.readLine()) != null)
if (temp.indexOf("AOU") >= 0)
value++;
br.close();
} catch (Exception ex) {
System.out.println("Exception Occured!");
}
return value;
}
}
2. Explain why a service is said to have the two properties “Statelessness” and
“Location Transparency” [8 Marks]
3. A company decided to build an “Open Music Share System” (OMSS), where people
can stream an audio track from other users by sending a request and then each
user’s system would either start streaming to the requester or would forward the
request to another user if the request cannot be fulfilled. A software engineer decided
to use the call-return architecture. Comment on whether the architecture selected is
the ideal choice or if a completely different architectural style should be used. (Make
sure to justify your answer) [5 Marks]
4. Draw a simple use case diagram with one actor “Receptionist”, to represent only the
following tasks: [7 Marks]
The Receptionist can “modify room type”
The Receptionist can “extend reservation duration”
To do the above 2 tasks the Receptionist must perform an “availability check”.
Note: Make sure to use the proper stereotype to represent this shared behavior.
[1 Mark for the actor, 3 Marks for the Use Cases (1 each), 1 Mark for the
associations (0.5 each), 2 Marks for the stereotypes. Total 7 Marks]
3. Given the following statechart diagram for the handset of a landline telephone system
with the basic events and their respective actions. Amend the diagram to represent
the following:
if the handset remains active for 20 seconds with no key presses it will trigger the
action “sound error tone”.
If the handset is in active state and a key gets pressed within 20 seconds it will
trigger the action “sound key press tone”
Note: Make sure to add all new transitions and guards and modify any existing
ones if necessary.
End of questions