Anda di halaman 1dari 10

Reserve book Browse

Browser
BookBorrower

Borrow copy
of book

Return copy
of book

Extend loan
Update
catalog

Borrow
journal
Librarian

Return
JournalBorrower journal

Figure 3.1 Use case diagram for the library.


Borrow
journal
Borrow copy
of book

Return
BookBorrower JournalBorrower journal

Return copy
of book

Figure 3.2 Use case diagram for the first iteration.


member librarian

[borrower] find book


on shelf

[returner]

wait in queue

[returning]

[borrowing]

record put book back


return 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 jour-
nals.
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 Copy
LibraryMember
1
0..*
0..*

borrows/returns
1

MemberOfStaff borrows/returns Journal

1 0..*

Figure 3.4 Initial class model of the library.


Book

1
is a copy of

1..*

borrows/returns Copy
LibraryMember
1
0..*

MemberOfStaff borrows/returns Journal

1 0..*

Figure 3.5 Revised library class model.


theLibraryMember : theCopy : Copy theBook : Book
LibraryMember

aMember : BookBorrower
borrow(theCopy)

1: okToBorrow okToBorrow

2: borrow
2.1: borrowed

Figure 3.6 Interaction shown on a sequence diagram.


returned()

returned()
not borrowable borrowable

borrowed()[ last copy]

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: Evaluate
design,
implement
test

Analyze requirements Analyze risks and


for this iteration plan

Figure 4.2 A simple spiral process.

Anda mungkin juga menyukai