Academic Year: 2014-2015 Second Semester Software Engineering Department

advertisement

Academic Year: 2014-2015

Second Semester

Software Engineering Department

Software Modeling (721222) Course

Section:2

Student Name:

Student Number:

ClassWork2

A library contains a lot of books. Each library book has many copies

Class : Library Book

.

Purpose : Book copy Lending

1.

Find out a property relevant to this class whose value is variable.

Answer:

Number-of-Available-copies

2.

Use abstraction on the possible values of this property to find out two abstract Library

Book states.

Answer:

Number-of-Available-copies >0 (Borrowable)

Number-of-Available-copies == 0 (Not borrowable)

2.

Find out two relevant events that affect the behavior of the Library Book class.

Answer:

borrowed

returned

3.

Draw the table that links the states and events found out in precedent questions.

Sates- Events Borrowable Not Borrowable borrowed returned

Borrowable | [Not last

Copy]

Not Borrowable | [Last

Copy]

Borrowable Borrowable

4. Draw the state diagram that describes the behavior of the Bank Account Class

Download