You are on page 1of 10

Reserve book

Browse Browser

BookBorrower Borrow copy of book

Return copy of book

Extend loan Update catalog

Borrow journal Librarian

JournalBorrower

Return journal

Figure 3.1

Use case diagram for the library.

Borrow journal Borrow copy of book Return journal

BookBorrower Return copy of book

JournalBorrower

Figure 3.2

Use case diagram for the rst iteration.

member

librarian

[borrower]

find book on shelf

[returner]

wait in queue [returning] [borrowing]

record return

put book back on shelf

record borrowing

prepare for next member

Figure 11.7 Business level activity diagram of the library.

Books and journals The library contains books and journals. It may have several copies of a given book. Some of the books are for short term loans only. All other books may be borrowed by any library member for three weeks. Members of the library can normally borrow up to six items at a time, but members of staff may borrow up to 12 items at one time. Only members of staff may borrow journals. Borrowing The system must keep track of when books and journals are borrowed and returned, enforcing the rules described above.

Figure 3.3

Nouns and noun phrases in the library.

Book

1 is a copy of

1..* borrows/returns 1 0..* 0..* borrows/returns 1 Copy

LibraryMember

MemberOfStaff

borrows/returns 1 0..*

Journal

Figure 3.4

Initial class model of the library.

Book

1 is a copy of

1..* borrows/returns 1 0..* Copy

LibraryMember

MemberOfStaff

borrows/returns 1 0..*

Journal

Figure 3.5

Revised library class model.

theLibraryMember : LibraryMember

theCopy : Copy

theBook : Book

aMember : BookBorrower borrow(theCopy) 1: okToBorrow okToBorrow

2: borrow 2.1: borrowed

Figure 3.6 Interaction shown on a sequence diagram.

returned()

not borrowable

returned() borrowed()[ last copy]

borrowable

borrowed()[not last copy]

Figure 3.7

State diagram for class Book.

Analysis

Design

Implementation

Testing

Maintenance

Figure 4.1

A simple waterfall process.

Engineer: design, implement test

Evaluate

Analyze requirements for this iteration

Analyze risks and plan

Figure 4.2 A simple spiral process.

You might also like