ECE 355: Software Engineering

Slides:



Advertisements
Similar presentations
Stereotypes Stereotypes provide the capability to create a new kind of modeling element. –They can be used to classify or mark modeling elements. –A type.
Advertisements

® IBM Software Group © 2006 IBM Corporation Rational Software France Object-Oriented Analysis and Design with UML2 and Rational Software Modeler 04. Other.
© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 1 Architectural Modeling Notations.
2008/03/25 Unified Modeling Lanauage 1 Introduction to Unified Modeling Language (UML) – Part One Ku-Yaw Chang Assistant Professor.
2-1 © Prentice Hall, 2007 Chapter 2: Introduction to Object Orientation Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra, Joseph.
UML – Class Diagrams.
1 © Wolfgang Pelz UML3 UML 3 Notations describe how to use reusable software. Package Component Deployment Node.
UML Class Diagram and Packages Written by Zvika Gutterman Adam Carmi.
Chapter 14 (Web): Object-Oriented Data Modeling
Class Diagram & Object Diagram
Data and Process Modeling
© Copyright Eliyahu Brutman Programming Techniques Course.
7M822 UML Class Diagrams advanced concepts 15 September 2008.
7M822 UML Class Diagrams advanced concepts 14 October 2010.
2-1 © Prentice Hall, 2004 Chapter 2: Introduction to Object Orientation (Adapted) Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra,
1 CS 501 Spring 2002 CS 501: Software Engineering Lecture 16 Object Oriented Design I.
Chapter 14: Object-Oriented Data Modeling
01 November 2007Kaiser: COMS W4156 Fall COMS W4156: Advanced Software Engineering Prof. Gail Kaiser
COMS W4156: Advanced Software Engineering
UML Diagrams Computer Science I.
Prepared by: Sanaz Helmi Hoda Akbari Zahra Ahmadi Sharif University of Tech. Summer 2006 An Introduction to.
Copyright 2002 Prentice-Hall, Inc. Modern Systems Analysis and Design Third Edition Jeffrey A. Hoffer Joey F. George Joseph S. Valacich Chapter 20 Object-Oriented.
Database Management System Prepared by Dr. Ahmed El-Ragal Reviewed & Presented By Mr. Mahmoud Rafeek Alfarra College Of Science & Technology Khan younis.
UML Diagrams: Class Diagrams The Static Analysis Model Instructor: Dr. Hany H. Ammar Dept. of Computer Science and Electrical Engineering, WVU.
1 UML Basic Training. UML Basic training2 Agenda  Definitions: requirements, design  Basics of Unified Modeling Language 1.4  SysML.
CHAPTER 13 (ONLINE): OBJECT-ORIENTED DATA MODELING © 2013 Pearson Education, Inc. Publishing as Prentice Hall 1 Modern Database Management 11 th Edition.
1 © Prentice Hall, 2002 Chapter 14: Object-Oriented Data Modeling Modern Database Management 6 th Edition Jeffrey A. Hoffer, Mary B. Prescott, Fred R.
Databases : Data Modeling 2007, Fall Pusan National University Ki-Joune Li.
Unit 1 INTRODUCTION TO MODELING AND CLASS MODEL Ref : L7-UML.PDF.
© 2011 Pearson Education, Inc. Publishing as Prentice Hall 1 Chapter 13 (Online): Object-Oriented Data Modeling Modern Database Management 10 th Edition.
CHAPTER 13: OBJECT-ORIENTED DATA MODELING (OVERVIEW) © 2013 Pearson Education, Inc. Publishing as Prentice Hall 1 Modern Database Management 11 th Edition.
Unified Modeling Language © 2002 by Dietrich and Urban1 ADVANCED DATABASE CONCEPTS Unified Modeling Language Susan D. Urban and Suzanne W. Dietrich Department.
® IBM Software Group © 2006 IBM Corporation Rational Software France Object-Oriented Analysis and Design with UML2 and Rational Software Modeler 03. Classes,
The Static Analysis Model Class Diagrams Prof. Hany H. Ammar, CSEE, WVU, and Dept. of Computer Science, Faculty of Computers and Information, Cairo University.
1 Advanced Software Architecture Muhammad Bilal Bashir PhD Scholar (Computer Science) Mohammad Ali Jinnah University.
UML Class Diagram Trisha Cummings. What we will be covering What is a Class Diagram? Essential Elements of a UML Class Diagram UML Packages Logical Distribution.
UML The Unified Modeling Language A Practical Introduction Al-Ayham Saleh Aleppo University
Lecture 1: UML Class Diagram September 12, UML Class Diagrams2 What is a Class Diagram? A class diagram describes the types of objects in the system.
1 The Unified Modeling Language. 2 The Unified Modeling Language (UML) is a standard language for writing software blueprints. The UML may be used to.
Class Diagram. Classes Software Design (UML) Class Name attributes operations A class is a description of a set of objects that share the same attributes,
Class Diagram Classes are the most important building block of any object-oriented system. A class is a description of a set of objects that share the.
Logical view –show classes and objects Process view –models the executables Implementation view –Files, configuration and versions Deployment view –Physical.
Object-Oriented Data Modeling
Design Model Lecture p6 T120B pavasario sem.
CSCI-383 Object-Oriented Programming & Design Lecture 10.
Software Engineering Lecture 8 Object-Oriented Analysis.
COMPONENT DIAGRAM in UML 2.0 Veronica Carrega. PLAN OF TALK  Introduction about components  Components and component diagrams in uml 2.0  Case study.
1 Technical & Business Writing (ENG-715) Muhammad Bilal Bashir UIIT, Rawalpindi.
ITEC0724 Modern Related Technology on Mobile Devices Lecture Notes #2 1.
Introduction to UML Hazleen Aris Software Eng. Dept., College of IT, UNITEN. …Unified Modeling Language.
CS 501: Software Engineering Fall 1999 Lecture 15 Object-Oriented Design I.
1 IS 0020 Program Design and Software Tools Unified Modeling Language Lecture 13 April 13, 2005.
1 IS 0020 Program Design and Software Tools Unified Modeling Language Lecture 13 November 30, 2004.
2-1 © Prentice Hall, 2004 Chapter 2: Introduction to Object Orientation Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra, Joseph.
CHAPTER
Unified Modeling Language (UML)
UML Diagrams: Class Diagrams The Static Analysis Model
Object-Oriented Modeling
Course Outcomes of Object Oriented Modeling Design (17630,C604)
COMPONENT & DEPLOYMENT DIAGRAMS
Object-Oriented Analysis and Design
DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING
Introduction to Unified Modeling Language (UML)
DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING
Object Oriented Analysis and Design
Lec 3: Object-Oriented Data Modeling
Software Engineering Lecture #11.
Chapter 20 Object-Oriented Analysis and Design
System Analysis and Design
Design Yaodong Bi.
Presentation transcript:

ECE 355: Software Engineering CHAPTER 2 Unit 4 (Part 2) Presentation material based on past ECE 355 notes by Prof. K. Czarneszki.

Course outline Unit 1: Software Engineering Basics Unit 2: Process Models and Software Life Cycles Unit 3: Software Requirements  Unit 4: Unified Modeling Language (UML) Unit 5: Design Basics and Software Architecture Unit 6: OO Analysis and Design Unit 7: Design Patterns Unit 8: Testing and Reliability Unit 9: Software Engineering Management and Economics

UML - Outline Introduction Behavioral modeling Structural modeling Static structural diagrams Class diagrams Object diagrams Implementation diagrams Component diagrams Deployment diagrams Advanced modeling

What is structural modeling? Structural model: a view of a system that emphasizes the structure of the objects, including their classifiers, relationships, attributes and operations.

Structural Modeling: Core Elements

Structural Modeling: Core Elements (cont’d) ¹ An extension mechanism useful for specifying structural elements.

Structural Modeling: Core Relationships

Structural Modeling: Core Relationships (cont’d)

Structural Diagram Tour Show the static structure of the model the entities that exist (e.g., classes, interfaces, components, nodes) internal structure relationship to other entities Do not show temporal information Kinds static structural diagrams class diagram object diagram implementation diagrams component diagram deployment diagram

UML - Outline Introduction Structural modeling Behavioral modeling Static structural diagrams Class diagrams Object diagrams Implementation diagrams Component diagrams Deployment diagrams Behavioral modeling Advanced modeling

Static Structural Diagrams Shows a graph of classifier elements connected by static relationships. kinds class diagram: classifier view object diagram: instance view

UML - Outline Introduction Structural modeling Behavioral modeling Static structural diagrams Class diagrams Object diagrams Implementation diagrams Component diagrams Deployment diagrams Behavioral modeling Advanced modeling

Class name Window origin attributes size Open() operations Close() Move() Display() operations

Active class EventManager Thick boundary Suspend() Flush()

Classes: compartments with names Fig. 3-23, UML Notation Guide

Classes with more details PackageName::Agent Name: simple, path Height: Float Val : Boolean = false Attribute: all, only some, or none <<constructor>> New(p : policy) <<process>> Process(o : order) … Operations: services provided. Stereotype: group attributes/ops and put a descriptive prefix. Responsibilities Responsibility: obligation of a class. free-form text. -- determine risk of an order -- handle criteria for fraud

Classifiers A classifier is a mechanism for describing structural and behavioral features. Nine classifiers Classes, interfaces, datatypes, signals, components, nodes, use cases, subsystems. Advanced features Multiplicity, visibility, signatures, polymorphism

Visibility of a classifier’s attr. & ops. Public: Any outside classifier can use (+). Protected: Any descendant of the classifier can use (#). Private: Only the classifier itself can use (-). Toolbar # currentSelection: Tool # toolCount: Integer + pickItem(i: integer) - compact()

(Owner) Scope Instance: Each instance of the classifier holds its own value for the feature. Classifier: There is just one value of the feature for all instances of the classifier. Frame instance Header : FrameHeader uniqueID : Long classifier (“static” in Java)

Multiplicity - Specification of the range of allowable cardinalities an entity may assume. 1 NetworkController consolePort [2..*] : Port

Classes: method body Fig. 3-24, UML Notation Guide

Showing more details... Names of abstract classes and operations shown in italics Fig. 3-20, UML Notation Guide

Relationships Dependency: Generalization: Use to show one thing using or deriving from another. Arrow in the direction of thing being depended on. Generalization: Use to show a parent-child relationship. Child is substitutable for parent (not the other way!) Association: (structural relationship) Objects of one thing are connected to another. Unary, binary, n-ary.

Relationships Window Event Open() Close() HandleEvent() dependency generalization association ConsoleWindow DialogBox Control DisplayPrompt() …

Generalization: Alternative notations Fig. 3-47, UML Notation Guide

Generalization: Multiple Classification Fig. 3-48, UML Notation Guide

More about association Works for Person Company Name an association to describe its nature. Direction triangle: direction of reading. employee employer Person Company Role: face presented to the other class.

More about association Navigability: An arrow may be attached to the end of the path to indicate that navigation is supported toward the classifier attached to the arrow. Works for Person Company

More about association Multiplicity: How many objects may be connected across an instance of an association. 1..* * Person Company employee employer Multiplicity at one end  for each object at the other end, there must be that many objects at the near end. Exactly one: 1 Zero or one: 0 .. 1 Many: 0 .. * One or more: 1 .. * Not shown  unspecified or suppressed

Aggregation Plain association: peer relationship. Aggregation: whole/part relationship. - An object may be a part of ONLY one aggregate at a time. Company whole 1 * Department part

More about association Composition (composite aggregation): - An object may be a part of ONLY one composite at a time. - Whole is responsible for the disposition of its parts. whole Window 1 * Frame part

Composition vs Aggregation Aggregation: does not link the lifetimes of the whole and its parts. Composition: Parts with nonfixed multiplicity can be created after the composite itself.  lifetime Such parts can be explicitly removed before the death of the composite.  lifetime An object may be a part of only one composite at a time.  strong ownership

Alternative notations for composition Fig. 3-45, UML Notation Guide Fig. 3-45, UML Notation Guide

More about association Association classes: specify properties of an association. employer employee Person Company 1..* * Job Description dateHired Salary

Ternary Associations Fig. 3-44, UML Notation Guide

Constraints Constraints add new semantics or change existing rules. Portfolio Corporation {secure} {or} BankAccount Person

Constraints and Comments Fig. 3-17, UML Notation Guide

Derived Attributes and Associations Fig. 3-52, UML Notation Guide

More examples of associations

More examples of associations Fig. 3-40, UML Notation Guide

Dependencies Fig. 3-50, UML Notation Guide

Realization - A semantic relationship between classifiers. - One classifier specifies a contract that another guarantees. - Realization in two places: - between interfaces and classes/components that realize them. - between use cases and collaborations that realize them. - Graphical rendering: cross between generalization and dependency

Interface Defines a set of operation specs Never defines an implementation (no attributes, no associations, operations not implemented) Typically attached to a class or component

Interfaces: Shorthand Notation Fig. 3-29, UML Notation Guide

Interfaces: Longhand Notation Fig. 3-29, UML Notation Guide

Types and Implementation Classes Fig. 3-27, UML Notation Guide

Type Like an interface: Defines a set of operation specs Unlike an interface: Can have attributes and associations

Class Diagram Example Adapted from Fig. 23 [EJB 2.0].

Not discussed... Associations with qualification Associations with roles and interface specification See UML User Guide, p. 145ff

UML - Outline Introduction Structural modeling Behavioral modeling Static structural diagrams Class diagrams Object diagrams Implementation diagrams Component diagrams Deployment diagrams Behavioral modeling Advanced modeling

Instances Concrete manifestation of an abstraction All objects are instances Not all instances are objects. (Instance of an association is a “link”) To indicate an instance, underline its name

Instances (named, anonymous, multiple) t: Transaction named myCustomer :Multimedia::AudioStream anonymous multiobject :keyCode

Object state myCustomer Instance with attribute values Id : SSN = “432 …..” Active = true Instance with explicit state c: Phone [WaitingForAnswer]

Object diagrams Model the instances of things contained in class diagrams. Show objects are their relationships at a point in time. No communication is shown.

An object diagram c:Company d1: Dept d2: Dept name = “R&D” name = “Sales” Objects, links, notes, constraints d3: Dept Name = …. p: Person : ContactInfo Name = “jk” Address=“200 U Av.”

Composite objects Fig. 3-39, UML Notation Guide

UML - Outline Introduction Structural modeling Behavioral modeling Static structural diagrams Class diagrams Object diagrams Implementation diagrams Component diagrams Deployment diagrams Behavioral modeling Advanced modeling

Implementation Diagrams Show aspects of model implementation, including source code structure and run-time implementation structure Kinds component diagram deployment diagram

UML - Outline Introduction Structural modeling Behavioral modeling Static structural diagrams Class diagrams Object diagrams Implementation diagrams Component diagrams Deployment diagrams Behavioral modeling Advanced modeling

Component Diagram Shows the organizations and dependencies among software components Component a modular, replaceable and significant part of a system that packages implementation and exposes a set of interfaces Components may be implemented by artifacts (e.g., binary, executable, or script files)

Component Diagram Fig. 3-95, UML Notation Guide

UML - Outline Introduction Structural modeling Behavioral modeling Static structural diagrams Class diagrams Object diagrams Implementation diagrams Component diagrams Deployment diagrams Behavioral modeling Advanced modeling

Deployment Diagram Shows the configuration of run-time processing elements and the software components, processes and objects that live on them Deployment diagrams may be used to show which components may run on which nodes

Deployment Diagram Fig. 3-97, UML Notation Guide