


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: Dr. E. A. Parslow Mr. P. O’Connor Dr. Dubhchair Mr. A. Tobin
The Big Library has many books. Each book contains a bibliography; each bibliography consists of a number of references to other books. Typically a book will be referred to in many places, and therefore a reference can appear in more than one bibliography. (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 to represent the following problem domain.
The Big Payroll Company wishes to create a software package to monitor employees’ salary payments. To calculate an employee’s salary, the Big Payroll Company needs to take into consideration holidays taken against holiday entitlement, number of days’ sick leave in a pay period, bonuses, and deductions. An employee must specify how his/her salary should be paid, although this may change over time. Almost all employees are paid by electronic bank transfer, but some types of employees may be paid by cash or check. If payment is electronic, then a routing number and account type are required. Payment can only be made by one method. There are various reasons for deductions being made; for example, tax, medical plan, retirement plan, or cash advance_._ (10 Marks) (d) What is the cardinality of the association between the classes in each of the
following pairs? Explain your answers.
(a) the classes Tree and Leaves. (b) the classes Cops and Robbers. (c) the classes Zoo and Animals (d) the classes Lecturer and Student. (e) the classes Book and Pages. (5 Marks)
(b) “Design by Composition is now seen as a better solution than Design by Inheritance”. Do you agree with this quote? What is the reason for your answer? Illustrate using examples why you would use composition rather than inheritance? When would you use inheritance? (10 Marks)
(c) In analysis, we create a conceptual model as a representation of real-world entities. What kind of attributes should we include with this conceptual model? Why? What kind of attribute should we not include with this conceptual model? (5 Marks)
(b) The following is a system behaviour contract for an operation called scheduleRoom(size, timePeriod): roomNumber in a Meeting-Scheduler Software System:
Contract
Name Of Operation: scheduleRoom (size,timePeriod):roomNumber
Responsibilities: The schedule room operation schedules a room of a specified size for a specified time period. It returns a room number that fits the required criteria.
Cross References: Use Case: Schedule Room
Preconditions: There exists a room r , such that r’s size is at least as large as size , and r is available during timeperiod.
Postconditions: For the smallest room r such that r’s size is at least as large as size and r is available during timeperiod :
r is no longer available during timePeriod , and return’s r’s roomNumber.
Create a collaboration diagram for the scheduleRoom(size, timePeriod): roomNumber operation using your knowledge of the General Principles in Assigning Software Responsibilities Patterns (GRASP Patterns). (8 Marks)
(c) Develop a minimal class diagram for the above operation. (8 Marks)