






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) Give a brief overview of the four major aims of software modelling [2]
(b) In software there are several ways to approach a model. The two most common ways are an Algorithmic perspective and an Object Oriented perspective. Differentiate between these two perspectives [2]
(c) A model can be defined as the simplification of a complex system for the purpose of communicating specific detail. In this way a model operates much like a lens. Discuss. [2]
(d) Identify the advantage(s)/disadvantage(s) of any two fact finding techniques you would use when gathering the requirements for a new computer system for a business. [4]
(e) Read the following description for a company called FoodCo , and decide which parts are functional requirements and which are non-functional requirements. [6]
The allocation of staff to production lines should be mostly automated. A process will be run once a week to carry out the allocation based on the skills and experience of operatives. Details of holidays and sick leave will also be taken into account. A first draft allocation list will be printed off by 13.00 on Friday for the following week. Only staff in production planning will be able to amend the automatic allocation to fine tune the list. Once the amendments have been made, the final Allocation list must be printed out by 5.00pm. The system architects must ensure that the database is capable of updating its record count within a predetermined response time. The system must be able to handle allocation of 200 operatives at present and should be capable of expansion to handle double that number capable. The system must have less than 1 hr downtime per three months
(f) Regardless of whether a system is being developed for a text-based environment or for a GUI environment , there are a number of important characteristics of good dialogue design. Give an overview of any 4 characteristics. [4]
Q2. (a) Differentiate between an object diagram and a class diagram in UML. [2]
(b) Draw a UML class diagram that could generate the UML object (or instance) diagram shown in the figure below. Make reasonable choices for multiplicity.
Hint : use appropriate associations, generalizations and aggregations/compositions. [6]
(c) Draw a class diagram for the following scenario
A library keeps records of borrowers and books. There are two kinds of borrower: adult and junior. An adult borrower may have up to 5 books out at a time. A junior borrower must be introduced by an adult borrower who has the same address and may have up to 3 books out at a time. Books are either on loan to a specific borrower or on the shelves.
The library has multiple copies of popular books. A borrower will have to pay a fine for books returned after the loan period. Each book title has the following information recorded about it, title, author, ISBN. A copy of a book is identified by its accession number. Books are organised on shelves according to the category of the book.
The library maintains a number of catalogues from different publishes. Each book will belong to only one catalogue.
[7]
Canada:Country
Ne -York:State
border
border
isPartO
border
border
isPartO
border
isPartO
isPartO
border
border
border
Texas:Stat (^) isPartO
border
border^ Manitoba:Province
Quebec:Province
USA:Countr
Saskatchewan:Province
Newfoundland:Provinc
isPartO
Mexico:Country
border
Q3. (a) What is the purpose of a domain model? [2]
(b) In agile software development you want to travel as light as possible, and the easiest way to do that is to choose the best artefact to record information. Outline the main reasons why you would want to record a concept once. [2]
(c) Business rules are discovered as part of a formal requirement gathering process during the initial stages of a project. Give an overview of how business rules should be recorded. [2] (d) Draw a class diagram to represent the following situation [4] Consider a system with a class Project, a class Employee, and an association worksOn between employees and projects. Each employee may work on any number of projects. Each project involves one or more employees. For each employee and each project that the employee works on, the system stores the date that the employee joined the project (startDate) and the percentage of the employee's time that is devoted to that project (percentOfTime).
(e) Consider developing a campus classroom facilities management system. The campus has a collection of classrooms. Each classroom has a collection of equipments, which may include microphone, blackboard, overhead projector, TV, Internet connection, etc. Each equipment has information such as history, condition, available forms (built in or for picking up somewhere), as well as information specific to the equipment, such as size for blackboard and TV, mobile or not for microphone, and speed of connection to Internet. Each classroom has a list of courses scheduled to take place in it, the instructor for each course, requested equipments and setups for each course, and a manager in charge of setting up the equipments. The system should allow instructors to look up the list of equipments in a classroom, request equipments and setups, and query the setup status. The system should send request for equipments and setups in a classroom to the classroom manager. The manager can update equipment information and setup status. In case of an equipment can not be setup according to the request, the manager should notify the instructor as soon as possible. The system should also allow anyone to send comments to the manager.
Create a domain model for this system [10]
Q4. (a) What are meant by the following terms as used in relation to use case diagrams? (i) Actor (ii) Use Case (iii) Scenario (iv) post condition [4]
(b) Use a diagram to illustrate the prototyping process. [2]
(c) Two basic differences exist between essential user interface prototyping and traditional prototyping. Identify these differences. [2]
(d) Use a class diagram to model the following situation. A scheduled leg of a train journey has a scheduled departure time and a scheduled arrival time. Each scheduled leg of the train journey will involve the use of two stations. It is important to distinguish the destination station from the departure station. [2]
(e) Draw a class diagram corresponding to the following sequence diagram [4]
(f) The library contains several types of items including books, movies and music recordings and each item may have more than one copy (e.g. two copies of the movie “Gone with the wind” might be available in the library). Note that each copy of a library item will have the same title and ISBN number but different bar code numbers. Depending on the needs of the library users, the administration decides whether a particular copy of an item is in one of three statuses: available for loan, on-reserve or available as reference only. When a particular item is on-reserve, the users may borrow it with the condition to return the item the same day before the specified duration is over (e.g. 2 hours). Items in reference only status, however, might not be removed from the library under any circumstances. For instance, the library might have decided to keep one of the copies of the movie “Gone with the wind” as reference, whereas the other copy is made available on reserve, leaving no copy available for loan. Default library policy is to keep items of a single copy available as reference only. However, the status of a copy might change from time to time (e.g. the
Q5. (a) Object –oriented programming has two main objectives: to build highly cohesive classes and maintain loose coupling between those classes. Explain. [2]
(b) What is dynamic classification and how can it be modeled? [2]
(c) Explain what is meant by the Law of Demeter. [2]
(d) Explain what is meant by a ‘use case realization. [2]
(e) Draw a class diagram that corresponds to the following communication diagram. [6]
3.1.1: listCampaigns 3.1.1.1 *[For all client’s campaigns]:getCampaignDetails
5.1.1.1: Advert
4.1.1.1 *[For all campaign’s adverts]:getAdvertDetails
:AddAdvertUI :AddAdvert
:Client :Campaign (^) :Advert
3: selectClient 3.1: showClientCampaigns
4: selectCampaign (^) 4.1: showCampaignAdverts
5: createNewAdvert 5.1: addNewAdvert
newAd:Advert 2: startInterface 1 *[For all clients]: getClient
:CampaignManager
sd Add a new advert to a campaign
5.1.1: addNewAdvert 4.1.1: listAdverts 3.1.1: listCampaigns 3.1.1.1 *[For all client’s campaigns]:getCampaignDetails
5.1.1.1: Advert
4.1.1.1 *[For all campaign’s adverts]:getAdvertDetails
:AddAdvertUI :AddAdvert
:Client :Campaign (^) :Advert
3: selectClient 3.1: showClientCampaigns
4: selectCampaign (^) 4.1: showCampaignAdverts
5: createNewAdvert 5.1: addNewAdvert
newAd:Advert 2: startInterface 1 *[For all clients]: getClient
:CampaignManager:CampaignManager
sd Add a new advert to a campaign
5.1.1: addNewAdvert 4.1.1: listAdverts
(f) Draw a Sequence Diagram for the following scenario: Ally is a student, who is a member of the library. She is interested in borrowing a movie, so she accesses the library catalog through an Internet browser and searches for movies with keywords “Gone with the Wind”. The search returns exactly one movie with the given name (with ISBN# 123) with two copies (bar code numbers 456 and 457). She tries to loan the first copy but it turns out that the first copy is for reference only. She then tries the second copy and this copy is on loan but luckily it’s due to be back tomorrow and there is no existing reservation on the copy. So she puts a reservation on this copy and logs out. You may assume that Ally has already logged on to the system to start with.
[6]
Q6. (a) Give a brief description of each of the following and illustrate how it is modelled in UML.
(i) Interface (ii) Abstract Class (iii) Component (iv) Required Interface (v) Provided Interface [5]
(b) Explain what is meant by the following statement. “If a variable is declared to be the type of an interface, its value can reference any object that is instantiated from any class that implements the interface.” [3]
(c) Reverse engineer the following code by drawing an object diagram showing the objects that are created when the method main runs and the messages that are passed between these objects. A playlist object is used to hold references to different types of tracks that can be played. A track can either be an MP3 track or A wav track. Each type of track can be played. Public staic main(string[] args ) { playlist list = new playList (); list.add (new Mp3(“who let the dogs out? “ , 193)); list.add (new Wav(“Meowth song”,253)); list.add (new mp3(“Thunderball” , 480)); list.play() }
(d) The Program below defines a number of classes for handling invoices. An invoice is produced for a client and contains a number of lines, each which records a component of the total invoice, either the cost of some materials or a charge for labour. Draw a class diagram showing as much information as possible from the following class definitions
Q7. (a) Define the following terms as used in relation to state machines [2]
(i) State (ii) Transition (iii) event (iv) History pseudostate.
(b) An airline company takes bookings for airline seats on a preliminary booking basis. Such bookings are made well in advance of the required travel date and are accompanied by a deposit. The agency will accept changes to the booking without any change in the deposit. Indeed, if one cancels at an early stage then the deposit is refunded and the booking is deleted. Tickets must be issued one week prior to travel so the company will issue an invoice for the outstanding fare well in advance of this. After a booking has been invoiced it may be changed, but it cannot be cancelled, a record is kept and the deposit is not refunded. When the fare is paid in full the booking becomes a ticketed booking and no further changes can be made. One can cancel the booking but one looses the fare. When the ticket is used to travel the booking is considered fulfilled. Periodically all fulfilled and cancelled bookings are archived. Construct a state transition diagram for the booking class. [8] (c) Answer the following questions that relate to operations (i) What are the two main purposes of an operation specification? (ii) Why is it important to specify both pre and post conditions for an operation? [4]
(d) Here is the main part of an operation specification written in OCL: Give a full logic description for this specification. [6]
Context: CreativeStaff:: changeGrade(grade:Grade, gradeChangeDate:Date) Pre: grade oclIsTypeof(Grade)
gradeChangeDate >= today post : self.staffGrade -> exists() and
self.staffGrade[previous] -> notEmpty() and self.staffGrade.gradeStartDate = gradeChangeDate and self.StaffGrade.previous.gradeFinishDate = gradeChangeDate – 1 day