1 / 31

CS-432: Modern Software Engineering Week 4

CS-432: Modern Software Engineering Week 4. Dr. Jesús Borrego Lead Faculty, COS Regis University. Class Outline. Review of Homework Key Terms Inheritance and Generalization Transitivity and Abstract Classes Sequence Diagrams Activity Diagrams Statecharts Midterm exam Questions?.

Download Presentation

CS-432: Modern Software Engineering Week 4

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. CS-432: Modern Software EngineeringWeek 4 Dr. Jesús Borrego Lead Faculty, COS Regis University

  2. Class Outline Review of Homework Key Terms Inheritance and Generalization Transitivity and Abstract Classes Sequence Diagrams Activity Diagrams Statecharts Midterm exam Questions?

  3. Review of Homework All homework submitted has been graded If you have not submitted some assignments, please do so right away Do not forget about next week’s homework Let me know if you are having problems with material in the course Make sure you read the material assigned before class and before attempting the homework

  4. Key Terms Anthropomorphism – antropomorfismo Axiom – axioma Boundary class – clase en la periferia Instance – instancia Interface - interfaz

  5. Inheritance & Generalization Relation Inheritance is the ability to define a new class by extending an existing class – attributes and operations of existing class are included in new class

  6. Inheritance Example • Note #id – protected (accessible in subclasses, but private to instantiated classes) Common characteristics are moved to parent (Section) Generalization Relations are used from child to parent (Classroom and Online) Describes isa type

  7. Inheritance terms Superclass – the parent of a set of classes; attributes and operations are inherited by the subclasses Subclass or Derived class – derived from the parent superclass, inheriting attributes and operations

  8. Transitivity and Abstract Classes Class and Online objects are also a type of Model and inherit attributes and operations from Model

  9. Transitivity and Abstract Classes (Cont’d) Abstract class – a class that is incomplete and cannot be instantiated. Denoted by using italics in the name Model and Section are abstract Classroom and Online are called concrete classes

  10. Abstract Operations Some classes cannot be implemented until we determine the subclass – paintSelf, eraseSelf

  11. Classifier and Instance Instance variables are variables that are created as part of the class (created when the class is instantiated) If we want to create variables that are not created every time the class is instantiated, we need to declare static variables A static variable is common to all class instantiations

  12. Sequence Diagram Revisited Loops

  13. Sequence Diagram Revisited Branching (opt)

  14. Sequence Diagram Revisited Referencing (ref)

  15. Activity Diagram Activity diagrams are sometimes called “object-oriented flowcharts”. They allow you to model a process as a collection of activities and transitions between those activities. Activity diagrams are really just special cases of state diagrams where every state has an entry action that specifies some process or function that occurs when the state is entered.

  16. Activity Diagram (Cont’d) Activity diagrams are used to document workflows in a system, from the business level down to the operational level. The general purpose of activity diagrams is to focus on flows driven by internal processing versus external events.

  17. Activity Diagram - Elements

  18. Activity Diagram – Elements (Cont’d)

  19. Activity Diagram Process This section describes a five-step process used to create an activity diagram. Since the activity diagram can be used to model any kind of process, you should first set the context or scope of the activity being modeled. Once you have determined the scope, you should give the diagram an appropriate title. You must identify the activities, control flows, and object flows that occur between the activities. You should identify any decisions that are part of the process being modeled. You should attempt to identify any prospects for parallelism in the process. You should draw the activity diagram.

  20. Statechart diagram Statechart diagrams also model the dynamic behavior aspects of a system. Statechart diagrams tend to be used for modeling the lifecycle history of a single object in the system. Some objects are incredibly complicated, so complex that developers can have difficulty understanding them.

  21. States The state of an object is defined by the value of its attributes and its relationships with other objects at a particular point in time. The attributes of an object affect the state it is in. The key to successful statechart modeling is to identify the states that make a difference to your system.

  22. Events An event is something that takes place at a certain point in time and changes a value(s) that describes an object, which, in turn, changes the object’s state. It can be a designated condition becoming true, the receipt of the call for a method by an object, or the passage of a designated time period. The state of the object determines exactly what the response will be.

  23. Transitions A transition is a relationship that represents the movement of an object from one state to another state. Some transitions will have a guard condition (represents the value of the test for that particular path to be executed) An object typically moves from one state to another based on the outcome of an action that is triggered by an event.

  24. Actions and Activities An action is an atomic, non-decomposable process that cannot be interrupted. From a practical perspective, actions take zero time, and they are associated with a transition. In contrast, an activity is a decomposable process that can be interrupted. Activities take a long period of time to complete, they can be started or stopped by an action, and they are associated with states.

  25. Statechart Diagram Elements

  26. Building a Statechart Diagram

  27. Polymorphism Is an important concept used in virtually every object-oriented design. Means many forms and concerns the ability of an object to dynamically take on a different form depending on the runtime context. Polymorphism involves the behavior of objects. This behavior is a direct result of the inherent design of a class.

  28. Activity 1 Develop a state diagram for the state of a video in the Blockbuster case study Consider when the video is ordered, purchased and entered in the store for check out. Work as a group (30 min.)

  29. Homework 4 This week you will begin working on your design model, which will consist of class and sequence diagrams. The models in this assignment will be assessed using the DesignModelRubrics.doc expectations rubric. Submit to WorldClass before Week 5

  30. Next Class Wednesday, February 5, 2014 Make sure you turn in any assignments due by next class We review the midterm exam next week, so submit to WorldClass before week 5’s class

More Related