0% found this document useful (0 votes)
23 views8 pages

MT 03

The document is a midterm test for a university course on information systems analysis and design. It contains four questions testing knowledge of class diagrams, use case diagrams, state diagrams, sequence diagrams, and object constraint language. Students are asked to improve class diagrams, describe metrics, draw diagrams, and represent constraints.

Uploaded by

tepetolga8
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
23 views8 pages

MT 03

The document is a midterm test for a university course on information systems analysis and design. It contains four questions testing knowledge of class diagrams, use case diagrams, state diagrams, sequence diagrams, and object constraint language. Students are asked to improve class diagrams, describe metrics, draw diagrams, and represent constraints.

Uploaded by

tepetolga8
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

CSC340 Information Systems Analysis and Design page 1/8

Faculty of Arts and Science


University of Toronto

Midterm Test
Department: Computer Science
Instructor: John Mylopoulos
Date and Time: 6:10pm Monday, March 3, 2003

Conditions: Closed book


Duration: 50 minutes

This test counts for 20% of your final grade

Name:
(Please underline last name)

Student Number:

Question Marks

1. ____________/20

2. ____________/30

3._____________/20

4. ____________/30

Total ____________/100
CSC340 Information Systems Analysis and Design page 2/8

1. [Short Questions; 20 marks total]

(a) [Class diagrams – 4 marks] Here is a class diagram that represents employees in an organization.
Propose two improvements to the diagram. You need not draw another diagram.

Employee
emp#: Number
manager: Employee
manager#: Number
assign: Project

(a) Remove the manager# attribute, it is redundant


(b) Make “assign” an association, so that an employee can have several assignments.

(b) [Class diagrams – 2 marks] For the class Employee given above, specify in OCL the following
constraint: “The manager# of an employee is the same with the emp# of his/her manager”

Employee
manager# = manager.emp#

(c) [Non-functional requirements – 4 marks] Describe a possible metric for measuring each of the
following non-functional requirements:

Reliability Percentage of up-time per year

Usability Number of training days required for users


CSC340 Information Systems Analysis and Design page 3/8

1. [Short Questions; continued]

(d) [Use Case Diagrams – 5 marks] Draw a use case diagram for courses. In particular, assume that
courses are taught by instructors, while registrars can enroll or remove students from a course. Students
take a course, provided they are enrolled in it.

Teach course Take course


Instructor
Student

Registrar Enroll student


in course

Remove student
from course

(e) [Requirements specifications – 5 marks] What does it mean to have a requirements specification
document that is “traced” and “traceable”? How do you ensure each one of these qualities?

Traced -- there is information in the document on the source of each requirement


(i.e., where did it come from.)

Traceable -- each requirement is numbered; document sections are numbered


down to the paragraph level so that one can refer to them during the design phase.
CSC340 Information Systems Analysis and Design page 4/8

2. [State Diagrams; 30 marks] Give a state diagram that describes the lifetime of a video tape in a video
store. You can assume that a video tape is purchased, packaged properly (plastic case with identification
information on the outside), put in the video store database, and is then put up for rental. Customers who
choose to rent it, check it out and return it in 3 days. If a customer fails to return it, the store calls him/her
the next day. The call is repeated a second time after 2 more days, and if the tape is not returned within 2
more days, the store delegates the matter to a collection agency and removes the video tape from its
collection. If the tape is damaged on return, it is removed from the collection database also. Finally, if the
tape is missing during the annual store inventory, it is removed from the collection database as well.

Make sure to define events, conditions, actions for transitions in your diagram, where appropriate.

purchased done/addToDB
Package Available

selected/checkout
checkedIn[OK?]/
makeAvailable
overdue
[4 days after returned/checkin
Overdue Borrowed CheckIn
checkout]/call

missingDuringInventory/
removeFromDB
overdue
[6 days after checkedIn[notOK?]/
checkout]/call overdue removeFromDB
[8 days after checkout]/
delegateToCollectionAgency
CSC340 Information Systems Analysis and Design page 5/8

3. [Sequence Diagrams; 20 marks] To buy a book electronically from chapters.com, a customer needs to
select the book from a list provided by Chapters’ eCommerce system, provide credit card information to the
system, then the system gets authorization from the bank for the payment, and -- if positive -- confirms the
sale. The order is then sent to the orders department and when the book becomes available, it is shipped to
the customer. Also, the order department charges the customer’s credit card by informing the bank of the
amount.

Draw a sequence diagram that models this process. Make sure to model all relevant actors and the
interactions between them. Do show explicitly the time intervals when different actors actively participate
in the process you are modeling.

:CustomerP :WebSystem :Bank :Or d e r D e p t


requestBookInfo()
show(BookList)

order(Book)
authorize(Book.price)

reply(Y/N)
[Yes?]acknowSale()
fulfilOrder(Book)
[available?(Book)]ship(BookCopy)

c h a r g e (a c c t , a m o u n t )
CSC340 Information Systems Analysis and Design page 6/8

4. [Class Diagrams, 30 marks] Consider the world of companies: Companies employ employees (who can
only work for one company), and consist of one or more departments. Each company has a single
president, who is an employee. Departments have employees as members and run projects (one or more.)
Employees can work in 1 to 3 projects, while a project can have 2 to 50 assigned employees. You may
assume that companies have a name and address, while employees have a emp# and a salary.

(a) [Drawing class diagrams – 20 marks] Draw a class diagram for the description above. Make sure to
show attributes, multiplicities and aggregation associations, where appropriate. No need to show any
operations.
1 president 0..1
Employee Company
emp# employedBy
salary 0..N 1
name
2..50 1..N addr
assignedTo 1
memberOf
has
1..3 1..N
1
Project runBy Department
1..N 1

(b) [Object Constraint Language (OCL) -- 10 marks] Express the following class constraints in OCL:

No employee can earn more than $200K

salary ≤ $200K (or, self.salary ≤ $200K)

An employee can only be assigned to projects run by her company

self.assignedTo.runBy.has = self.employedBy

No employee can earn more than her president

self.salary ≤ self.employedBy.president.salary
CSC340 Information Systems Analysis and Design page 7/8

(Scratch paper)
CSC340 Information Systems Analysis and Design page 8/8

(Scratch paper)

You might also like