1 / 11

Dynamic Modeling: Defining Classes

Dynamic Modeling: Defining Classes. B.Ramamurthy. Introduction. (User) Requirement Analysis was done using Use Case Model. Result of this phase is a Use Case Diagram(s).

Download Presentation

Dynamic Modeling: Defining Classes

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Dynamic Modeling: Defining Classes B.Ramamurthy B.Ramamurthy

  2. Introduction • (User) Requirement Analysis was done using Use Case Model. Result of this phase is a Use Case Diagram(s). • Further analysis involves using the use cases to discover classes and relationship among them. Result of this phase is a class diagram(s). • Next the classes need to be defined: the attributes, the methods and dynamics of the interaction among the classes.Dynamic Model expresses the dynamic behavior of objects of class and the interaction among objects during the execution of a system. • Dynamic Modeling Tools are: Collaboration diagram, state diagram, sequence diagram and activity diagram. B.Ramamurthy

  3. Topics for Discussion • Revisit Weather Station analysis. • Other class diagrams from Lab2. • Class definition. • Interface, Abstract Class, Concrete Class. • Sequence Diagrams: describe how objects interact and communicate with each other. Primary focus here is time. • Collaboration Diagrams: describe how objects interact but the focus is on space. • Activity Diagrams: yet another way of showing interaction but with focus on activities. • Since Sequence, Collaboration, and Activity diagrams all show interaction, you must make a choice as what you want to use in your practice. • State Diagrams: describe which states an object can have during its life cycle, behavior in those states, and along with events that bring about state transitions. • We will study Sequence Diagrams and State Diagrams. B.Ramamurthy

  4. Class Definition • Class name • Class attributes/characteristics/properties/data • Class operations/capabilities/behaviors/methods • Types of methods: • Constructor(s) • Destructor • Service methods • Get/set methods • Utility methods • Predicate methods B.Ramamurthy

  5. Sequence Diagrams • Sequence diagrams illustrate how objects interact with each other. • They focus on message sequences. • Objects interact by sending messages that invoke operations specified by the objects receiving the messages. • Two axes: vertical axes shows time, horizontal access shows objects. B.Ramamurthy

  6. Message Types and Notation (UML) Synchronous Message (call) Asynchronous Message (interrupt) Simple Message (passing of control Flow) Message Return Note: Rational Rose Demo tool provides just one type of arrow head for all the messages. B.Ramamurthy

  7. Components of a Sequence Diagram An object which is an instance of class Manager An object Dan which is an instance of class Manager An Object Dan, the Manager is sending a message to Sue, the Employee to contactClient(); contactClient() is a method of Employee class. B.Ramamurthy

  8. Job Application: Class Diagram B.Ramamurthy

  9. Job Application: Sequence Diagram B.Ramamurthy

  10. State Diagram • Defines the semantics of a class or operations within an object. • Basic components: Initial State, Final State, intermediate state, state transition and associated labels. • All objects have a state which is a result of previous activities performed by the object. B.Ramamurthy

  11. Matrix of Diagrams Use Case Component Sequence Collabortn. Deployment Package State CRC Class Activity Analysis System Design Class Design Physical Architecture B.Ramamurthy

More Related