


Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!



Answer any Four questions. Examiners: Ms. M. Meagher Ms. A. Brown Mr. A. Tobin
Q1. (a) What is the difference between an object and a class? Give an example of both using UML notation. (4 Marks)
(b) What do you understand about the terms Polymorphism and Late-Binding. Use examples to illustrate your answer. (4 Marks)
(c) Discuss the phases and disciplines/workflows that one finds in the Unified Process. What in your opinion are the most important artefacts that one should produce? Explain the reasoning for your choices (5 Marks)
(d) Discuss the UML Activity diagram with respect to its notation, meaning and purpose. Use an example to illustrate your answer. (4 Marks)
(e) ‘ A customer places an order with a supplier. The order is for various numbers of different kinds of parts; the distinction between different kinds of parts is not important. An order consists of a number of order lines; each line specifies a particular part from the supplier’s catalogue, and says how many are to be ordered. In response to an order, the supplier makes up a delivery, consisting of all the ordered parts. ’
Draw a class diagram for this situation, and discuss the possible uses of aggregation in the diagram. (8 Marks)
Q2. (a) Construct a Domain Model diagram to represent the following problem domain – Use the abbreviated UML class diagram notation for this:
‘Companies may employ many people, and people may work for many companies. Each company has a managing director, and every employee in a company has a manger, who may manage many subordinate employees.’
(5 Marks)
(b) Outline your understanding of the type of relationships that can exist among classes. (5 Marks)
(c) Using the UML notation, draw a class diagram showing the structure of programs written in the language based on the following description of a part of the syntax of a programming language:
‘A module consists of a collection of named features. A feature can either be a variable, a routine or a nested module. Routines consist of a declaration part and a statement part. Features local to the routine can be declared in the declaration part, and the statement part consists of a non-empty sequence of statements. Statements can be loops, conditionals or assignments, and each assignment contains a reference to the variable that it is being assigned to.’ (10 Marks)
(d) Define multiplicities for the following associations. Create a UML class diagram to illustrate each answer:
(a) ‘ Has on loan’ , linking people to books in a library system. (b) ‘ Has read’ , linking people to books. (c) ‘ Is occupying’ , linking chess pieces to squares on a chess board. (d) ‘ Spouse’ , linking class ‘Person’ to itself_._ (e) ‘ Parent’ , linking class ‘Person’ to itself_._ (5 Marks)
Q5. (a) There are a number of different patterns that can be used for assigning responsibilities in the creation of collaboration diagrams. List five such patterns, and explain their application to the creation of an imaginary collaboration diagram. (9 Marks)
(b) The following is a system behaviour contract for an operation called makeChequePayment in a Point-of-Sale-Terminal system:
Contract
Name: makeCheckPayment (driversLicenceNum :number)
Responsibilities: Create and request authorisation for a check Payment. Type or Class:
Cross References: Use Case – Buy Items
Notes: The request has to be transformed into a flat Record.
Output:
Pre-conditions: The current sale is complete.
Post-conditions:
Create a collaboration diagram for the makeChequePayment operation using your knowledge of the General Principles in Assigning Software Responsibilities Patterns (GRASP Patterns). (8 Marks)
(c) Develop a minimal design class diagram for the above operation. (8 Marks)