Use Case Driven Analysis Chapter 1 5 Revision




















- Slides: 20

Use Case Driven Analysis Chapter 1 -5 Revision: The bigger picture

Behaviour State 2

Use case diagrams: l Model building is one of the best ways for analysts to l l understand the business processes and to remember what they have learned from their fact finding activities/documentation. Use case related models are the “fully developed use case description, ” UML : activity diagrams, and system sequence diagrams (SSD). 3

Cont: l l The “fully developed use case descriptions” are used to document the context, purpose, description, conditions, and workflow of each use case-textual Activity diagrams are a graphical depiction of the use case workflow and are useful in illustrating the alternative paths through a business process. SSDs are used to document the inputs and outputs that are passed between the user and the system during a use case. Not only do these models document the internal steps of a use case, but the very act of developing these models force the analyst to ask detailed questions and help improve the understanding of the requirements 4

Domain model diagrams: l l The State machine diagram is a class related model. For some object classes in the domain model it is necessary to understand the life cycle of individual objects. This is especially true for business objects that can have different status conditions. A state machine diagram documents what these status conditions are and how an object changes status condition by transitioning from state to state. 5

Quiz: l l When would you use a brief use case description as opposed to a fully developed one? What is meant by a “precondition? ” What is meant by a “post-condition? ” Why are activity diagrams useful for understanding a use case? 6

Quiz: l l l What is a SSD? What is meant by an opt frame? What is meant by an alt frame 7

Object inter-action: l l l In the object-oriented approach, the flow of information is achieved through sending messages either to and from actors or back and forth between internal objects. A system sequence diagram (SSD) is used to describe this flow of information into and out of the automated system In a use case diagram, the actor “uses” the system, but the emphasis in an SSD is on how the actor “interacts” with the system by entering input data and receiving output data 8

Object-state: l A state might have a name of a simple condition, such as: l l l My car went for service: On or In repair. Other states are more active, with names consisting of gerunds or verb phrases, such as Being shipped or Working. The name of a state shouldn’t be an object (or noun); it should be something that describes the object (or noun). States are described as semi-permanent conditions: l because external events can interrupt a state and cause the object to go to a new state. An object remains in a state until some event causes it to move, or transition, to another state 9

Use case vs. scenario: l A use case is the generalized version, and a scenario is a particular instance of it. The best way to explain this concept is with an example. l l A generalized use case of Purchase Product is different for shopping online than it is for shopping in a store. The online version has many more computer system related steps to find product, catalogue showing images, add it to the shopping cart, and then checking out. The store version does not involve the computer system until it is time to check out. So even though the general use case is the same, the internal processing flow is very different. Hence, each version must be documented separately 10

Conclusion: l l Several variations of the business steps exist within a single use case. These different flows of activities are called scenarios or sometimes use case instances 11

Pre- Post Conditions: l Almost all pre-conditions and post-conditions have to do with the data in the database, its availability, and its condition. Example: l l Purchasing Product. In order for the Purchase product use case to even begin, there must be product “available”. Depending on the users definition, a customer data record may also need to be in existence. These are pre-conditions. 12

Post- condition: l After the use case has finished executing, then there must also be a l l l Reduction in product’s inventory, and there must be a purchase object in a particular status (such as ready for shipping). Depending on the requirements there must either be a payment object, or perhaps and increase in the customer account value. Q: Can you think of a situation when “customer account value” can become a state? 13

Complete “view”: l l It is important to understand that all of these models link together to provide a complete picture of the user's requirements. And, it is extremely important that the models are consistent with each other. Information across all of these models must be consistent and provide a unified picture of the requirements 14

Conclusion: l Two diagrams are especially important because they provide an overview or comprehensive view of the entire system: l l One is the use case diagram, which in its complete form identifies all of the use cases to be implemented. The other is the class diagram or the domain model, which provides information about all of the data items required 15

Cont: l l The Use case diagram feeds into the Use case descriptions, Activity diagrams, and SSDs, all of which document information about individual use cases. The State machine diagram and to some extent the SSD are fed by the class diagram. A state machine diagram covers only one class, where the SSD may refer to many different objects or attributes as parameters in the messages. 16

Quiz: l l l Which are the two overview or high-level diagrams? A single use case is described in depth by which models? The life of the objects in a single object class is described by which model? 17

Theory Test: l Tuesday: l l Make sure you understand O-O paradigm Short questions on certain terms Questions on SSD and State machine Best of luck! 18

Introduction Conclusion l l Mountains should be climbed with as little effort as possible and …. “The only Zen you find on the tops of mountains is the Zen you bring up there” l “Zen and the art of motor cycle maintenance” 19

Your mountain: l l l Mountains like these and travellers in the mountains and events that happen to them here are found not only in Zen literature but in the. tales of every major religion The allegory of a physical mountain for the spiritual one that stands between each soul and its goal is an easy and natural one to make. Like those in the valley behind us, most people stand in sight of the spiritual mountains all their lives and never enter them, being content to listen to others who have been there and thus avoid the hardships. Some travel into the mountains accompanied by experienced guides who know the best and least dangerous routes by which they arrive at their destination. Others attempt to make their own routes…. 20