0% found this document useful (0 votes)
31 views

TM354-Final-Other-Spring21-22-Key

Uploaded by

hadialsimsmani
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
31 views

TM354-Final-Other-Spring21-22-Key

Uploaded by

hadialsimsmani
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

Faculty of Computing Studies

TM354 [ Answer Key ]


Software Engineering
Final Examination
Spring Semester 2021/2022

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.

TM354 – Final Exam [Answer Key] Page 1 of 6 2021/2022 Spring


Part I – Multiple Choice Questions 10 Marks
Answer all the following multiple choice questions. Each question is worth 2 Marks.

1. The functional requirements that provide a more detailed description of the


functionality to be provided are categorized as
a. System Requirements c. Customer Requirements
b. User Requirements d. Developer Requirements

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

3. In DbC, which of the following cannot be represented by an assertion


a. Services c. Post-condition
b. Pre-condition d. Invariant

4. In package diagrams, which stereotype can give rise to a naming problem


a. <<access>> c. <<include>>
b. <<import>> d. <<extend>>

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

Part II – Short Answer Questions 30 Marks


Answer all the following short answer questions.

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;
}
}

TM354 – Final Exam [Answer Key] Page 2 of 6 2021/2022 Spring


Cyclomatic: (Start of Method: 1) + (while loop: 1) + (if statement: 1) + (catch keyword:
1) = 4
CBO: (File: 1) + (String: 1) + (BufferedReader: 1) + (FileReader: 1) + (Exception: 1) +
(System: 1) = 6
[Each value in parentheses 1 Mark. Total 10 Marks]
[If a student provided the totals (4 and 6) only without tracing the calculation,
award 2.5 marks for each correct value. Total 5 Marks]

2. Explain why a service is said to have the two properties “Statelessness” and
“Location Transparency” [8 Marks]

 Statelessness: A service or component is stateless if it responds to each


request as a ‘one-off’, without retaining any memory of previous requests.
 Location transparency: Clients can use a service without needing to know its
physical location.
[4 Marks each. Total 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]

The call-return architecture is not suitable for such a service. A peer-to-peer


architecture would be much better since the audio streaming will occur between
peers and there is no need for any record keeping or synchronous communication.
[Award the full 5 Marks for any logically correct and clear answer. Award up to
3 Marks for valid but unclear answers]

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]

Part III – Problem Solving Questions 60 Marks


Answer all the following problem solving questions. Each question is worth 20 Marks.

1. Given the following Object Diagram:

TM354 – Final Exam [Answer Key] Page 3 of 6 2021/2022 Spring


Draw the corresponding class diagram and make sure to include the following: All the
classes, All the Attributes, All the Associations, All the multiplicities, All the Role Names.
[20 Marks]

Award Marks according to the following:


Classes: 1 Mark each, Total 3 Marks
Attributes: 0.5 Marks each, Total 3 Marks
Associations (non-recursive): 2 Mark each, Total 4 Marks
Recursive Association: 4 Marks
Multiplicities: 0.5 Marks each, Total 3 Marks
Role Names: 0.5 Marks each, Total 3 Marks
[Total: 20 Marks]

2. Draw a Sequence Diagram to represent the registration of a course at AOU. You


need to use 3 Objects (aUserInterface, :Registration, :Course) and 5 Messages
(showAdvisedCourses(), viewSections(), checkAvailability(), enrollSection(),
addStudent()).
[20 Marks]

TM354 – Final Exam [Answer Key] Page 4 of 6 2021/2022 Spring


[3 Marks for the Objects (1 Mark each)]
[5 Marks for the messages (1 Mark each)]
[3 Marks for the lifelines (1 Mark each)]
[5 Marks for the activations, the activation of the user interface is not required]
[4 Marks for the logical sequence and clarity]
[Total 20 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.

TM354 – Final Exam [Answer Key] Page 5 of 6 2021/2022 Spring


[20 Marks]
Possible Answer:

[5 Marks for each new Transition. 10 Total]


[5 Marks for each new event/action. 10 Total]
Note: students might use Guard instead of event/action, which should be considered a valid
answer
[Total 20 Marks]

End of questions

TM354 – Final Exam [Answer Key] Page 6 of 6 2021/2022 Spring

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy