110 likes | 200 Views
Chapter 8 TC. TC 3 (parts a, b, c). Authors Approach. Do first cut sequence diagram including only actor and problem domain classes. Add view layer and data access layer classes and redo sequence diagram. (Note: there is little basis for the view layer or how it operates.)
E N D
Chapter 8 TC TC 3 (parts a, b, c)
Authors Approach • Do first cut sequence diagram including only actor and problem domain classes. • Add view layer and data access layer classes and redo sequence diagram. (Note: there is little basis for the view layer or how it operates.) • Complete the design classes based on top two exercises • Problems: • Creation of sequence diagrams occurs several times and sequence diagrams are complex and timely to create. • Little understanding of how the use case is visualized, so classes added might require revision or deletion. • The use of controllers is undefined and rules for what type of object should communicate with another are not defined, causing later revisions in model. • Design class attribution is a guess and might require changes later.
Robustness Approach • Build User Interface prototype explaining the visual solution to the use case. • Perform robustness to discover new controller classes and add UI classes from prototype. • Confirm through robustness, applying rules, the flow of control in the use case with all defined objects being added to model. • Develop sequence diagram adding methods to defined design classes. • Complete the design diagrams with discovered attributes. • Benefits: • Allows visualization of the use case and thinking through the user view of the problem. • Robustness diagram is easy to draw and confirms the flow of execution through the use case. • Robustness rules create an executable relationship between objects that can be implemented. • A single sequence diagram is created with actual methods and method signatures added to design classes. • Design class attributes are completed based on UI prototype, method signatures, and domain model
Assumptions • Each book is assigned a unique catalog number. • Book copies of a title can vary by edition and ISBN number. • The title definition consists of title, author, publisher, and a category • Titles are uniquely identified by title. • Book copies are uniquely identified by catalog number.
User Interface Prototype Add Copy Catalog # ISBN Year Menu Edition Book Title Search Receive a Book Exit Submit Cancel Title Author Category Add Title Title Info Copy Info Catalog # ISBN Year Edition xxxxxxxxx xxxxxxxxx xxxx xx xxxxxxxxx xxxxxxxxx xxxx xx xxxxxxxxx xxxxxxxxx xxxx xx Title Catalog # Author ISBN Category Year Search Add Title Add Copy Cancel Publisher Edition Submit Cancel
Receive a Book Robustness
: Librarian : Librarian : TitleSearch : TitleSearch : SearchController : SearchController : DataSearchController : DataSearchController : AddCopy : AddCopy : AddTitle : AddTitle : AddController : AddController : Menu : Menu : BookTitle : BookTitle : BookCopy : BookCopy Normal Flow Add Title 1: searchClick( ) 2: DataSearchController( ) 3: executesearch( ) 4: searchTitle( ) 5: addtitleClick( ) 6: SearchController( ) 7: dotitle( ) 8: AddTitle( ) 9: submitClick( ) 10: AddController( ) 11: createTitle( ) 12: BookTitle() 13: addtitle() 14: BookCopy() 15: addbookcopy() 16: SearchController() 17: Menu() Normal Flow Add Copy 18: addcopyclick( ) 19: SearchController( ) 20: docopy( ) 21: AddCopy( ) 22: submitclick( ) 23: AddController( ) 24: createcopy( ) 25: BookCopy() 26: addbookcopy() 27: SearchController() 28: Menu() Receive a Book Sequence
Design Process Review Analysis Design Use Case Description User Interface Prototype Design Class Diagram Robustness Analysis Sequence Diagram Domain Class Diagram Discover objects, confirm flow, completeness check Construct object messages and define methods for design classes Complete class attribution based on domain model, methods, and UI prototype Windows or pages and overall flow to use case