





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!






Instructions: Answer five questions Examiners:^ Dr. M. O Cinneide Mr. M. Donnelly Ms. M. Davin
Q1. (a) Through modelling we achieve four aims. Give an overview of each of these aims. [2 marks] (b) Differentiate between the Use Case view and logical views of a system. [ marks] (c) In software there are two ways to approach the development of a model. The two most common perspectives are the algorithmic perspective and the object oriented perspective. Differentiate between these two perspectives. [2 marks] (d) What is meant by each of the following? [6 marks] (i) Domain Analysis (ii) Domain Model (iii) Project Scope (e) Give an overview of the three main types of non functional requirements of a system. [3 marks] (f) Name the five main fact-finding techniques and list one advantage and one disadvantage of each. [5 marks]
Q2. (a) What is the purpose of producing Use cases? [2 marks]
(b) Describe in your own words the difference between the <
- Customers should be able to directly authorise payments from particular accounts to companies. Priority payments (which have some additional processing) take precedence over “normal” payments. However, all types of payment can only be made from savings/ deposit accounts; no others
N.B. When answering this question, state any assumptions made:
(c) On a single diagram, illustrate the following using the UML notation for objects links and messages. [ marks] (i) An object of class Window , with no attributes shown. (ii) An object of class Rectangle with attributes length and width. Assume that the rectangle class supports an operation to return the area of a rectangle object. (iii) A link between the window and rectangle objects , modelling the fact that the rectangle defines the screen co-ordinates of the window. (iv) The window object sending a message to the rectangle asking for its area.
Q4. (a) Explain each of the following terms. Give an example of each. [6 marks]
(i) Abstraction (ii) Encapsulation (iii) Polmorphism
(b) An object has three properties. Give a brief overview of each. [3 marks] (c) Explain each of the following when applied to operations. [3 marks] (i) Signature (ii) Visibility (iii) Side effects (d) Differentiate between an object diagram and a class diagram. [2 marks] (e) A workstation currently has three users logged into it, with account names A,B,C. Theses users are running four processes , with process IDs 1001 , 1002 , 1003 and 1004 User A is running processes 1001 and 1002 , B is running process 1003 and C is running process 1004. (i) Draw an object diagram showing objects representing the workstation, the user and processes and links to represent the relationships of a process running on a workstation and a user owning a process. (ii) Consider an operation which lists information about the processes that are currently running on a workstation. It can either report on all the current processes or if invoked with a suitable argument , the processes for a single specified user.
Discuss what messages would need to be passed between the objects in part (i) to implement the operation. [6 marks]
Q5. (a) What do each of the following terms mean and how are they modelled in UML? (i) Abstract Class (ii) Class-scope attribute (iii) Interface [3 marks] (b) How can referential integrity be enforced in an object-oriented system? [ marks] (c) What is a derived attribute and under what circumstances should derived attributes be used? [2 marks] (d) The following relates to a small General Practitioner’s surgery, and the information it uses to support its business. The surgery keeps information on patients registered with it(patient number, name, address and telephone) and the GPs (doctor number, name, address and telephone) employed within it. Each patient is registered with a single GP but, if unavailable, they may make appointments to see any of the other GP in the surgery. A record of all appointment slots is maintained, and when patients ring in for an appointment they are allocated one of the unallocated appointment slots with their selected GP. Depending on the patient’s diagnosis, a GP may issue one or more prescriptions. Some prescriptions may be repeat prescriptions, but for all prescriptions it must be possible to determine the appointment from which the need for the prescription was determined. A repeat prescription may not necessarily be issued by the GP who made the initial diagnosis. Each prescription will have a prescription number and date. A prescription will contain one or more prescription items. Each Item prescribed will be for a drug at a certain dosage and quantity. Where a specialist opinion is necessary, a GP makes a referral to a hospital consultant. A number of referrals could be made from one appointment. The surgery keeps records of local hospitals and the consultants employed by them. Each consultant works for only one hospital. For accounting purposes the surgery needs to know whether the hospital is private or public (it cannot be both). For public hospitals the surgery keeps details of the district in which the hospital is situated. For private hospitals it keeps details of the private health scheme that operates the hospital. The information kept about the hospital itself is otherwise the same in both cases.
CreativeSt aff
campaign
assigned t o
Advert
Conducted by
StaffGrade
0.. 1 following0.. 1
(^1) previous
Grade
GradeRat e
isApplied to
1
0..
following 0..
previous 1
(d) Explain the meaning of each of the following OCL expressions. [5 marks]
1) Context Company self.employee->select(age<60) 2) Context Company inv: self.CEO -> size <= 3)
context Campaign post: if self.estimatedCost > estimatedCost @ pre and self.estimatedCost > budget and self.estimatedCost <= budget *1.02 then self.clientLetterRequired = ‘true’ else self.clientLetterRequired = ‘false’ endif
Q7. (a) Differentiate between the two types of interaction diagrams. [2 marks]
(b) How are the following illustrated on a sequence diagram? [5 marks] (i) Object Creation (ii) Object destruction (iii) Reflexive message (iv) Loop Combined fragment (v) Reply message (c) What consistency checks should be applied to interaction diagrams? [2 marks] (d) What is the purpose of object-oriented design? [2 marks]
(e) What is meant by the Liskov Substitution Principle and how is it violated in the following figure? [3 marks] c h e q u e A c c o u n t
M o r t g a g e A c c o u n t
(f) Explain why the following class has good operation cohesion but poor class cohesion. [2 marks]