290 likes | 671 Views
TODAY. OOSAD Projects Use Case Modeling Review Object Modeling Review Sequence Diagrams Activity Diagrams. OOSAD Project. Uses a more iterative design approach – such as prototyping or object-oriented analysis and design.
E N D
TODAY OOSAD Projects Use Case Modeling Review Object Modeling Review Sequence Diagrams Activity Diagrams
OOSAD Project • Uses a more iterative design approach – such as prototyping or object-oriented analysis and design. • During the OOSAD process, the system evolves incrementally over the life of the project. • A portion of the final system is always present and evolves during each iteration
OOSAD Project • System architectural decisions made early in the project • Each iteration has planning, analysis, design, and implementation phases • Mistake to make highly detailed plan for entire project up front • An OOSAD project typically has 6 to 9 iterations.
Phases of OOSAD-based Development Figure 1-14 Phases of OOSAD-based development 4
OOSAD Phases • Rational Unified Process (RUP) suggests 4 phases in OOSAD • Inception: Scope, feasibility, requirements, planning • Elaboration: Analysis and design • Construction: Coding, testing, documentation • Transition: Deployment, user training, support
Project Activity in OOSAD Figure 3-38 Project activity phase and focus
The Unified Modeling Language (UML) • A notation that allows the modeler to specify, visualize and construct the artifacts of software systems, as well as business models • Techniques and notations • Use cases • Class diagrams • State diagrams • Sequence diagrams • Activity diagrams
Use Case Model • Use Case Model made up of • Actors • Use cases • Actor is an external entity that interacts with the system. • Use case is a depiction of a system’s behavior or functionality under various conditions as the system responds to requests from users.
Use-Case Relationships • <<extends>> relationship • Extends a use case by adding new behavior or actions • Specialized use case extends the general use case • <<includes>> relationship • Indicates a use case that is used (invoked) by another use case • Links to general purpose functions, used by many other use cases
Dynamic Modeling: Sequence Diagrams • Sequence diagram: depicts the interactions among objects during a certain periods of time. • May be presented either in a generic form or in an instance form. • Generic form shows all possible sequences of interactions – sequences corresponding to all the scenarios of a use case. • Instance form shows the sequence for only one scenario.
Sequence Diagrams • Elements of a sequence diagram • Objects: represented by boxes at top of diagram. • Lifeline: the time during which an object exists. • Messages: means by which objects communicate with each other.
Sequence Diagram Figure 8-11 Sequence diagram for a class registration scenario without prerequisites
Sequence Diagram Figure 8-12 A generic sequence diagram for the “Prerequisite Courses Not Completed” use case
Activity Diagrams • Activity Diagrams: shows the conditional logic for the sequence of system activities needed to accomplish a business process. • Clearly shows parallel and alternative behaviors. • Can be used to show the logic of a use case.
Process Modeling: Activity Diagrams Figure 8-14 Activity diagram for a customer order process.
Activity Diagrams • Elements of Activity Diagrams: • Activity: a behavior that an object carries out while in a particular state. • Transition: a movement from one activity or state to another. • Branch: a diamond symbol containing a condition whose results provide transitions to different paths of activities.
Object Modeling Object: an entity with a well-defined role in an application domain, and has state, behavior, and identity characteristics. State: encompasses an object’s properties (attributes and relationships) and the values of those properties. Behavior: represents how an object acts and reacts. Object class (class): a logical grouping of objects that have the same (or similar) attributes, relationships, and behaviors (methods). 19
Object Modeling Figure 9-26 UML class diagram showing two classes 20
Class Diagram Class diagram: a diagram that shows the static structure of an object classes, their internal structure, and the relationships in which they participate. Operation: a function or a service that is provided by all the instances of a class to invoke behavior in an object by passing a message. Encapsulation: the technique of hiding the internal implementation details of an object from its external view. 23
Class Associations Association: a relationship among instances of object classes. Association role: the name given to the end of an association where it connects to a class. Multiplicity: indicates how many objects participate in a given relationship: 0..10 means minimum of 0 and maximum of 10 1, 2 means can be either 1 or 2 * means any number UML associations are analogous to E-R relationships and UML multiplicities are analogous to E-R cardinalities. 24
Class Associations Examples of binary associations 26
Associative Classes 27 Associative class: an association that has attributes or operations of its own or that participates in relationships with other classes. UML association classes are analogous to E-R associative entities. Generalization and inheritance implemented via superclass/subclasses in UML, supertypes/subtypes in E-R.
Associative Classes Class diagram showing associative class 28