Presentation is loading. Please wait.

Presentation is loading. Please wait.

Case Study in Analysis: A library information system.

Similar presentations


Presentation on theme: "Case Study in Analysis: A library information system."— Presentation transcript:

1 Case Study in Analysis: A library information system

2 Use case Make Book Entry l Use Case: UC1 - Make Book Entry l Actor: Library clerk l Success scenario: A library clerk accesses a terminal in order to enter one or possibly many book entries in a database. At the end of every entry, the system displays a confirmation message. At the end of the session the system would display an informative message.

3 SSD for Make Book Entry success scenario confirmation endBookEntry() confirmation addBook(author, title, publisher, year) makeNewBookEntry() :Library Clerk :System loop

4 Naming System Events and Operations l The set of all required system operations is determined by identifying the system events. makeNewBookEntry() addBook() endBookEntry()

5 Domain model conclusion TerminalLibrary Clerk Catalog Book Entry Book author title publisher year AccessesCaptures Accesses Contained-in 1 11 * 1 1 1 *

6 System operations and the system interface l In the UML the system as a whole can be represented as a class. l Contracts are written for each system operation to describe its behavior. System makeNewBookEntry() addBook() endBookEntry()

7 Operation contract: makeNewBookEntry Contract CO1:makeNewBookEntry Operation:makeNewBookEntry() Cross References:Use case Make Book Entry. Pre-conditions:None. Post-conditions:1. an instance of Book Entry be was created. (instance creation) 2. be was associated with Terminal (formation of association) 3. be was associated with Catalog (formation of association)

8 Operation contract: addBook Contract CO2: addBook Operation:addBook(author, title, publisher, year) Cross References:Use case Make Book Entry. Pre-conditions:A Book Entry session is under way. Post-conditions:1. an instance of Book b was created (instance creation). 2. b was associated with Catalog (formation of association)

9 Operation contract: endBookEntry Contract CO3: endBookEntry Operation:endBookEntry() Cross References:Use case Make Book Entry. Pre-conditions:A Book Entry session is under way. Post-conditions: BookEntry.isComplete was set to true. (modification of attribute)

10 Object design: makeNewBookEntry Contract CO1:makeNewBookEntry … Post-conditions:1. an instance of Book Entry be was created. (instance creation) 2. be was associated with Terminal (formation of association) 3. be was associated with Catalog (formation of association) makeNewBookEntry() :Book Entry 1: create() :Terminal :Catalog

11 Object design: addBook Contract CO2: addBook … Post-conditions:1. an instance of Book b was created (instance creation). 2. b was associated with Catalog (formation of association) addBook(…) b: Book 1: makeNewBook(…) 2.1: create (…) 2.2: add (b) :Terminal :BookEntry 2: makeNewBook(…) :Book :Catalog

12 Object design: endBookEntry Contract CO3: endBookEntry … Post-conditions:BookEntry.isComplete was set to true. (modification of attribute) endBookEntry() be:BookEntry 1: becomeComplete() public void becomeComplete() { isComplete = true; } UML notation for a constraint {be.isComplete = true} :Terminal

13 Class diagram conclusion Library Clerk AccessesCaptures 1 1 1 * 1 BookEntry makeNewBook() becomeComplete() isComplete: Boolean Terminal makeNewBookEntry() addBook() endBookEntry() Book author title publisher year Accesses Contained-in 1 1 * Catalog makeNewBook() add()

14 Use case Browse Catalog l Use Case: UC2 - Browse Catalog l Actor: Library clerk, Client l Success scenario: An actor accesses a terminal in order to browse the catalog by entering a keyword that describes a book category. During this session, an actor may repeat this process any number of times. Upon successful match the system displays a list of all books.

15 SSD for Browse Catalog success scenario informative message endBrowseCatalog() List of matched books searchForBook(keyword) browseCatalog() :Actor :System loop

16 Naming System Events and Operations l The set of all required system operations is determined by identifying the system events. browseCatalog() searchForBook() endBrowseCatalog()

17 Domain model Version 2 TerminalLibrary Clerk Catalog Book Entry Session Book author title publisher year AccessesCaptures Accesses Contained-in 1 11 * 1 1 1 * Browse Catalog Session Accesses1 1 Book Entry has been renamed to Book Entry Session

18 System operations and the system interface l In the UML the system as a whole can be represented as a class. l Contracts are written for each system operation to describe its behavior. System browseCatalog() searchForBook() endBrowseCatalog()

19 Operation contract: browseCatalog Contract CO3:browseCatalog Operation:browseCatalog() Cross References:Use case Browse Catalog. Pre-conditions:An instance of Catalog exists. Post-conditions:1. an instance of Browse Catalog Session bcs was created. (instance creation) 2. bcs was associated with Terminal (formation of association) 3. bcs was associated with Catalog (formation of association)

20 Operation contract: searchForBook Contract CO4: searchForBook Operation:searchForBook(keyword) Cross References:Use case Browse Catalog. Pre-conditions:A Browse Catalog session is under way. Post-conditions:None.

21 Operation contract: endBookEntry Contract CO5: endBrowseCatalog Operation:endBrowseCatalog() Cross References:Use case Browse Catalog. Pre-conditions:A Browse Catalog session is under way. Post-conditions: BrowseCatalogSession.isComplete was set to true. (modification of attribute)

22 Object design: browseCatalog Contract CO3:browseCatalog Operation:browseCatalog() Cross References:Use case Browse Catalog. Pre-conditions:An instance of Catalog exists. Post-conditions:1. an instance of Browse Catalog Session bcs was created. (instance creation) 2. bcs was associated with Terminal (formation of association) 3. bcs was associated with Catalog (formation of association) browseCatalog() :BrowseCatalog Session 1: create() :Terminal :Catalog

23 Object design: searchForBook Contract CO4: searchForBook Operation:searchForBook(keyword) Cross References:Use case Browse Catalog. Pre-conditions:A Browse Catalog session is under way. Post-conditions:None. searchForBook(…)1: find(…) 3: find (…) :Terminal :BrowseCatalog Session 2: find(…) :Book :Catalog

24 Object design: endBrowseCatalog Contract CO5: endBrowseCatalog … Pre-conditions:A Browse Catalog session is under way. Post-conditions: BrowseCatalogSession.isComplete was set to true. (modification of attribute) endBrowseCatalog() bcs:Browsecatalog Session 1: becomeComplete() public void becomeComplete() { isComplete = true; } UML notation for a constraint {bcs.isComplete = true} :Terminal

25 Class diagram conclusion Library Clerk AccessesCaptures 1 1 1 * 1 BookEntrySession makeNewBook() becomeComplete() isComplete: Boolean Terminal makeNewBookEntry() addBook() endBookEntry() browseCatalog() searchForBook() endBrowseCatalog() Book author title publisher year Accesses Contained-in 1 1 * Catalog makeNewBook() add() find() BrowseCatalogSession find() becomeComplete() isComplete: Boolean Accesses


Download ppt "Case Study in Analysis: A library information system."

Similar presentations


Ads by Google