Sie sind auf Seite 1von 11

INF207E/202/0/2009

SCHOOL OF COMPUTING

Object-Oriented Systems Analysis

INF207E

Tutorial letter 202/2009

ASSIGNMENT 2
Textbook: chapters 5 and 7 Due date: 21 May 2009
Chapter 5 Modeling System Requirements object-oriented parts Theory questions: Question 1 Question 1.1 What are the two key concepts used to begin defining system requirements? Answer: Events the system needs to respond to and things that the system needs to store information about. Question 1.2 What is a use case? Answer: A use case is an activity the system performs. Question 1.3 What are three techniques used to identify use cases? (2) (2) [12] (2)

Answer: The user goal technique, the CRUD technique, and the Elementary Business Process technique. Question 1.4 What is an event and what is an elementary business process (EBP)? Answer: An event is an occurance at a specific time and place that should be remembered. An EBP is a task that is performed by one person in one place in response to a business event. Question 1.5 What are the three types of events? Answer: A temporal event, a state event, and an external event. Question 1.6 Which type of event results in data entering the system? Answer: External event. Question 2 Draw a class diagram for the following system: The system stores information about two things: cars and owners. A car has attributes for make, model, and year. The owner has attributes for name and address. Assume that a car must be owned by one owner, and an owner can own many (2) (2) (2)

ICT2622/202/0/2009

cars, but an owner might not own any cars (perhaps he/she just sold them all, but we still want a record of her in the system). Include subclasses for sports car, sedan, and minivan with appropriate attributes. [6] Answer:

Owner ownerName ownerAddress


1 0...*

Car make model year

SportsCar raceStats

Sedan # ofDoors trunkSize

Minivan cargoCap seatingCap

Questions 3, 4, 5, 7, 8 and 9 are based on the case study below.


CASE STUDY An Employment Agency wants to computerise its information system. The purpose of the agency is to find employees for vacancies as notified by an employer/company. The agency has a number of offices and each office covers a specific area. Each office maintains listings of vacancies notified by employers as well as listings of employer/company information. In addition, each office also stores information about applicants. This information includes the applicant ID, applicant name, address, telephone number and placement-status (= unemployed initially). Each applicant may have one highest qualification and many applicants may have the same highest qualification. An employer/company sends vacancy and possible candidate information to the employment agency on a regular basis. The vacancy file is then updated with the following information: vacancy-code, vacancy-description, vacancy-start-date, vacancy-status (initially = open, and closed when vacancy is filled). The employer file contains the following information: employername, employer-address, employer-tel-no. After a request from an applicant, the agency records the applicant information in the applicant file. As soon as the applicant information is recorded, a program is triggered which matches the applicant information to available vacancies. If a match is found, an agent arranges interviews with companies after some preliminary discussion with the applicant and attempts to secure placement of the applicant. Records are kept of all the interviews and placements. Lists of the applicable interviews/company are created and sent to each employer/company. The following attributes are stored for each interview: interview-code, interview-date, interview-time, interview-address, interview-result (= initially, = successful or unsuccessful after the interview has been done). The employer notifies the agency of the results of each applicants interview. The agency then

4 updates the placement-status attribute in the applicant file, the interview-status in the interview file and, if the applicant was successful, the vacancy-status in the vacancy file is updated as well. The agency notifies the applicant in writing of the result of the interview. As soon as a company employs an applicant and informs the agency, his/her placement-status is changed from unemployed to employed in the applicant file. Immediately after this, the system automatically creates and sends an invoice containing an invoice number, amount due and name of applicant to the employer/company who employed the applicant. The system then automatically moves the applicants information from the applicant file to an applicant history file, where it is kept for further reference. The agency receives a commission from employers for each successful placement. When payment is received from a company, a receipt is issued, sent to the company and kept in a receipt file. At the end of each month reports of the following are printed, sent to the agencys managing director and filed: Successful interviews/placements Vacancies/employer

Apart from the business rules provided in the case study above, also take note of the following business rules: An employer/company may send information about many vacancies to the employment agency, but each vacancy belongs to only one specific employer/company. A vacancy may be suitable for one or more applicants, and an applicant may be suitable for one or more vacancies. There are 2 types of vacancies: contract and permanent vacancies. Contract vacancies have information on the length of the contract. Permanent have information about the length of a probation period. Although an applicant may be interviewed more than once (for different vacancies), a specific interview is held for only one applicant at a time. Many interviews may have to be held for a specific vacancy until a successful applicant is found and the vacancy filled, but a specific interview is held for a specific vacancy. An employer receives an invoice from the employment agency for each successfully placed applicant. Question 3 [18] Using the information of the employment agency case study above, create a domain model class diagram with attributes for each class and the relationships between the classes. Be sure to use the correct notation for association classes. Be sure to indicate subclasses where applicable and to use the correct notation to show a generalisation/specialisation hierarchy Answer: Relationships: Applicant:Vacancy *:* Employee:Vacancy 1:* Vacancy:Interview 1:* Applicant:Interview 1:* Employer:Invoice 1:* Mark allocation on CLASS DIAGRAM: 1,5 for each entity with attributes 0,5 for each correct part of each relationship =9 =5

5 1 for combining line of association entity 1 for each subclass 1 for correct indication of generalisation CLASS DIAGRAM

ICT2622/202/0/2009 =1 =2 =1

Question 4 [8] Develop an activity diagram for the use case from recording applicant information to informing the applicant of interview results. Answer: mark each for beginning and end = 1; 1/2 per process up to 14 * = 7

ICT2622/202/0/2009

Question 5 [12] Develop a fully developed description for the use case for the use case from recording applicant information to informing the applicant of interview results. Use the following layout for your answer. Use case name: Scenario: Triggering event: Brief description: Actors: Stakeholders: Preconditions: Postconditions: Flow of events: Actor System

Exception conditions: Answer: Use Case Name: Scenario: Triggering Event: Brief Description: Record applicant information, match to vacancies, arrange interviews and inform applicant of results. 0,5 An applicants information is recorded, matched to available vacancies, interviews are arranged and results given to applicants. Applicant applies for a job and applicants information is recorded 0,5 0,5

Actors: Stakeholders: Preconditions:

Postconditions:

Flow of Events:

An applicant applies for a job, his/her information is recorded and immediately after matched with available vacancies. If a match is found an agents arranges for interviews with applicable companies. Lists of information on interviews are sent to companies which return results of each interview to the employment agency. The applicant is informed of the results of the interview. 1 Clerk 0,5 Agent 0,5 Agencys managing director 0,5 The applicant must exist The company must exist The vacancy must exist 1 The vacancy file must be updated with latest placements The applicant file must be updated with placement information A company has to payment for each placement 1 Actor System

8 1. The clerk enters the applicant information into the applicant file. 1.1 System updates the applicant file with the new information. 1.2 The system matches the newly recorded applicant information with the vacancy file. 2.1 Lists of interviews are created.

2. If a match is found, the agent arranges for interviews with the applicant and companies. 3. Clerk send lists of interviews to applicable companies. 4. Clerk receives results of interviews from companies.

3.1 Create lists of interviews per company.

Exception Conditions:

5. Agent informs applicant of interview results 2,5 1. If an applicant fails to attend an interview without notification, the applicants information will be deleted from all applicable files. 2. If a company fails to pay after the placement of an applicant all further vacancies for the company will be withheld until payment.

2,5

Chapter 7 The Object-Oriented Approach to Requirements Theory questions Question 6 Question 6.1 What are the steps required to develop a system sequence diagram?

[14] (2)

Answer: There are four steps. In most cases the SSD can be developed from an activity diagram or a flow of events on the use case description. 1. Identify the input messages. This usually occurs on an activity diagram when an arrow crosses the swimlanes from the actor to the system. 2. Describe the input message with name, parameters, and other descriptors. 3. Identify other special conditions for the message, such as repetition or true/false conditions. 4. Add the output return messages. Question 6.2 What is the purpose of a state machine diagram? (2)

Answer: During analysis, state machine diagrams are used to describe the behavior of complex business objects. The primary focus of a state machine diagram is to identify the various states of a business object and to describe the ways in which the object moves from state to state. Question 6.3 List the primary steps for developing a state machine diagram. (2)

ICT2622/202/0/2009

Answer: 1. Pretend you are the object itself. Identify and model the states and transitions. 2. Make sure you review the state machine diagram and make necessary changes. 3. Make sure you havent left out any exception conditions. 4. Review the class diagram, and select the classes that will require a state machine diagram. 5. For each selected class in the group, make a list of all the status conditions you can identify. 6. Begin building state machine diagram fragments by identifying the transitions that cause an object to leave the identified state. 7. Sequence these state-transition combinations in the correct order. 8. Review the paths and look for independent, concurrent paths. 9. Look for additional transitions. 10. Expand each transition with the appropriate message event, guard-condition, and actionexpression. 11. Review and test each state machine diagram. Question 6.4 List the elements that make up a transition description. Which elements are optional? (2)

Answer: The elements are transition-name, guard-condition, and action-expression. All of these elements are optional. If a transition has none of these elements, it fires automatically when the object has finished any activity with the origin state. Question 6.5 What is a composite state? What is it used for? (2)

Answer: A composite state is a state containing multiple states and transitions. It represents a higher level of abstraction and can contain nested states and transition paths. Question 6.6 What is meant by the term path? Answer: A path is a sequential set of connected states and transitions. Question 6.7 What is the purpose of a guard-condition? Answer: A guard-condition indicates the condition that must be true before a transition can occur Question 7 [8] Identify all the use cases for the employment agency system and develop a use case diagram for the system. Answer: Mark allocation: 1 for each use case = 7*1 = 7 plus 1 for clerk =7+1 = 8 (2) (2)

10

Record info in vacanc y file

Record applicant information in applicant file

Match applicant information to vacancy list

Clerk
Update placem ent status in applicant file interview status in interview file and vacancy-status in vacancy file

Create Invoice

Move successful applicant into applicant history file

Record paym ent in employer file

Produce reports

Question 8 Develop a system sequence diagram for the use case for the event 'employer notifies employment agency of interview results'. Answer: 1 for each class = 3 for each msg, life line and the clerk =14/2 = 7 Still to check this answer

[7]

11

ICT2622/202/0/2009

SYSTEM

clerk
Update applicant (appl-ID, placement-status = 'employed'/'unemployed') Update Interview (interview-code, interview-result = 'successful'/'unsuccessful') Update Vacancy (Appl-ID, vacancy-code, vacancy-status = 'open'/'closed') Get Applicant information (Appl-ID) Get Interview information (interview-code) Get Vacancy information (vacancy-code)

Information for letter to Applicant

Question 9 Develop a statechart diagram for the applicant class of the employment agency system.

[15]

Answer: Mark allocation: 1 for beginning circle and end circle = 2, 1 for each state = 5, 1 for each message = 8; = 2 + 5 +8 = 15

UpdateInfo Applicant info(Appl-ID)

Create new Applicant Active

Match application to vacancies

Matched with vacancies

Arrange interviews

Get Applicant information (Appl-ID) interview results = 'successful'

Arranged interview

Employed

move to history file

Archived

interview results = 'unsuccessful'

TOTAL = [100]

Das könnte Ihnen auch gefallen