Philadelphia University
Lecturer: Dr. Moayad A. Fadhil
Coordinator: Dr. Moayad A. Fadhil
Internal Examiner: Dr. Samer hanna / /

Faculty of Information Technology

Software Engineering Department

Marking Scheme

…………………………………………………………………………………………………………………...

Software Analysis & Design (721322) Second Exam 1st Semester - 2015/2016

Date: 31/12/2015 Section: 1 Time: 60 Minutes …………………………………………………………………………………………………………

Information for Candidates

1.  This examination paper contains 3 questions totaling 21 marks.

2.  The marks for parts of questions are shown in square brackets:

Advice to Candidates

1.  You should attempt ALL questions and write your answers clearly.

2.  You are not allowed to split answers of one question and mix up sections of different questions.

……………………………………………………………………………………………..…………

I. Basic Notions

Objectives: The aim of the questions in this part is to evaluate your required minimal knowledge and understanding skills in the basics of Software Design.

Question 1 (8 marks)

A)  What are the basic design principles? (3 marks)

·  The Open-Closed Principle (OCP). “A module [component] should be open for extension but closed for modification.

·  The Liskov Substitution Principle (LSP). “Subclasses should be substitutable for their base classes.

·  Dependency Inversion Principle (DIP). “Depend on abstractions. Do not depend on concretions.”

·  The Interface Segregation Principle (ISP). “Many client-specific interfaces are better than one general purpose interface.

·  The Release Reuse Equivalency Principle (REP). “The granule of reuse is the granule of release.”

·  The Common Clos ure Principle (CCP). “Classes that change together belong together.”

·  The Common Reuse Principle (CRP). “Classes that aren’t reused together should not be grouped together.”

B)  Select the correct answer for each of the following. (3 marks)

1-  Flexibility, Reusability, and Maintainability are goals of software design. The way to accomplishing them is:

a.  Reuse flexible design.

b.  Keep code at a general level.

c.  Minimize dependency on other classes.

d.  A and b.

e.  All of the above.

2-  Design patterns are class combinations and algorithms that fulfil common design purposes.

a.  True. b. False.

3-  ______ensure that the class has exactly one instantiation, accessible throughout the application.

a.  Factory design patterns.

b.  Facade design patterns.

c.  Proxy design patterns.

d.  Singleton design patterns.

4-  A design pattern is a finished design that can be transformed directly into code.

a.  True. b. False.

5-  ______are design patterns that ease the design by identifying the simple way to realize the relationships between entities.

a.  Creational design patterns.

b.  Structural design patterns.

c.  Behavioral design patterns.

6-  We consider design patterns from two Viewpoints:

a.  Creational and structure.

b.  Structure and behaviour.

c.  Static and dynamic.

d.  All the above.

.

C)  For the following system decomposition: (2 marks)

a.  Calculate the coupling factor.

b.  Is the design complex? If so, suggest a suitable solution.

-“M1 calls M2, M3, and M4”. -“M2 calls M5, M6,, and M7”.

- “M3 calls M7, and M8”. -“M4 calls M7, M9, and M10”.

- “M7 calls M11”. -“M8 calls M12, and M13”.

-“M11 calls M14, and M15”.

Couple Factor for the system= 16 Complex Design

Merge M5 and M6 with M2;

Merge M12 and M13 with M8;

Merge M14 and M15 with M11;

II. Familiar Problems Solving

Objectives: This part aims to evaluate that you have some basic knowledge of the key aspects of the lecture material and can attempt to solve familiar problems.

Question 2 (9 marks (3 marks each))

Characterize the following design pattern purpose. Explain your conclusion clearly using UML (class and sequence) diagrams.

1. We must build a human resources application dealing with management structure at a large company. We need to represent the organization chart within the application.

2. We must build an application with 15 different screens involving various combinations of 6 user interface controls (e.g., list boxes) arranged in a simple grid. Performing a mouse action or text entry on control (e.g., a button) in a screen affects other controls on the same screen. In all other respects the screens are not related and are not similar in appearance. The composition of these screens is very unlikely to change.

3. Consider the following: You are tasked with building an application to draws automobile for the customer. The user is presented with drawing interface shown the shape of the automobile, and the following information:

Car Style: Classic Dragster Refined

Colour: Red Green Purple

III.Unfamiliar Problems Solving

Objective: This part aims to evaluate that you have some basic knowledge of the key aspects of the lecture material and can attempt to solve unfamiliar problems.

Question 3 (4 marks)

The following concerns a simplified system of a coin-operated pay phone:

1)  The minimum cost of call is 20 units.

2)  After inserting the coins, the user have 2 minutes to dial the number (this time limit is enforced by Public Switched Telephone Network).

3)  The line may be free or engaged.

4)  The caller may hang up first.

5)  The pay phone uses up the money as soon as the callee picks up the receiver and each unit of time generated by the Public Switched Telephone Network.

6)  The caller can add more coins at any time.

Answer the following questions concerning the above system:

1.  Draw a UML use cases diagram.

2.  Draw UML Class diagram.

3.  Construct a system sequence diagram.

4.  Develop the state diagram of the pay phone.

5

Software Analysis & Design\ (721322) Second Exam 1st Semester 2015/2016 31/12/ 2015