תרשים המחלקות ותרשים העצמים 1. חלק שלישי: ניתוח ועיצוב מערכות מידע באמצעות שימוש ב-UML ומתודולוגיית ה-Unified Process (UP) E1 3 E2 2.

Slides:



Advertisements
Similar presentations
CIT731: Database Development Object Oriented Modeling (OOM)
Advertisements

Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall A.1.
Chapter 22 Object-Oriented Systems Analysis and Design and UML Systems Analysis and Design Kendall and Kendall Fifth Edition.
Unified Modeling Language
2008/03/25 Unified Modeling Lanauage 1 Introduction to Unified Modeling Language (UML) – Part One Ku-Yaw Chang Assistant Professor.
Object-Oriented Analysis and Design
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 UML – an overview What is UML? UML stands for Unified Modelling Language. ”The Unified Modelling Language is a visual language for specifying, constructing.
Chapter 14 (Web): Object-Oriented Data Modeling
7M701 1 Class Diagram advanced concepts. 7M701 2 Characteristics of Object Oriented Design (OOD) objectData and operations (functions) are combined 
Unified Modeling Language (UML)
Kari R. Schougaard, PhD Stud. Værktøjer og Teknikker, 2006 UNIVERSITY OF AARHUS Department of Computer Science Unified Modeling Language Visual language.
C++ Training Datascope Lawrence D’Antonio Lecture 11 UML.
Copyright 2004 Prentice-Hall, Inc. Essentials of Systems Analysis and Design Second Edition Joseph S. Valacich Joey F. George Jeffrey A. Hoffer Appendix.
Chapter 14: Object-Oriented Data Modeling
UML Class Diagrams: Basic Concepts. Objects –The purpose of class modeling is to describe objects. –An object is a concept, abstraction or thing that.
2005/05/25 Unified Modeling Lanauage 1 Introduction to Unified Modeling Language (UML) – Part One Ku-Yaw Chang Assistant Professor.
UML Unified Modeling Language. What is UML? Unified Modeling Language (UML) is a standardized, general-purpose modeling language in the field of software.
SOFTWARE DESIGN AND ARCHITECTURE LECTURE 18. Review User interface Design principles Design Guidelines.
Copyright 2001 Prentice-Hall, Inc. Essentials of Systems Analysis and Design Joseph S. Valacich Joey F. George Jeffrey A. Hoffer Appendix A Object-Oriented.
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.
Unified Modeling Language, Version 2.0
R McFadyen Chapter 7 Conceptual Data Modeling.
Programming in Java Unit 3. Learning outcome:  LO2:Be able to design Java solutions  LO3:Be able to implement Java solutions Assessment criteria: 
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.
7-1 © Prentice Hall, 2007 Chapter 7: Conceptual Data Modeling Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra, Joseph S. Valacich,
© 2009 Pearson Education, Inc. Publishing as Prentice Hall 1 Chapter 15: Object-Oriented Data Modeling Modern Database Management 9 h Edition Jeffrey A.
Unit 3 Conceptual Data Modeling. Key Concepts Conceptual data modeling process Classes and objects Attributes Identifiers, candidate keys, and primary.
7-1 © Prentice Hall, 2007 Week 5: Conceptual Data Modeling Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra, Joseph S. Valacich,
Databases : Data Modeling 2007, Fall Pusan National University Ki-Joune Li.
CHAPTER 13: OBJECT-ORIENTED DATA MODELING (OVERVIEW) © 2013 Pearson Education, Inc. Publishing as Prentice Hall 1 Modern Database Management 11 th Edition.
Software Engineering Prof. Ing. Ivo Vondrak, CSc. Dept. of Computer Science Technical University of Ostrava
UML diagrams What is UML UML diagrams –Static modeoing –Dynamic modeling 1.
ניתוח מערכות מידע 1 Unified Modeling Language (UML) § § The Unified Modeling Language (UML) is the industry-standard language for: Specifying, Visualizing,
1 Advanced Software Architecture Muhammad Bilal Bashir PhD Scholar (Computer Science) Mohammad Ali Jinnah University.
Fall 2010 CS4310 Requirements Engineering A Brief Review of UML & OO Dr. Guoqiang Hu Department of Computer Science UTEP 1.
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.
Object-Oriented Data Modeling
Object-Oriented Modeling: Static Models. Object-Oriented Modeling Model the system as interacting objects Model the system as interacting objects Match.
Unified Modelling Language (UML) Software Engineering Lab. Sharif University of Technology.
Object-Oriented Analysis and Design CHAPTERS 9, 31: DOMAIN MODELS 1.
Lab 5 CPIT 250 System Analysis and Design.
Software Engineering Lecture 8 Object-Oriented Analysis.
Object Modeling THETOPPERSWAY.COM. Object Modelling Technique(OMT)  Building a model of an application domain and then adding implementation.
CHAPTER 13: OBJECT-ORIENTED DATA MODELING (OVERVIEW) Modern Database Management 11 th Edition Jeffrey A. Hoffer, V. Ramesh, Heikki Topi © 2013 Pearson.
Class Diagram Lecture # 1. Class diagram A Class Diagram is a diagram describing the structure of a system shows the system's classes Attributes operations.
Copyright © 2009 Pearson Education, Inc. Publishing as Prentice Hall Appendix A Object-Oriented Analysis and Design A.1.
Introduction to UML Hazleen Aris Software Eng. Dept., College of IT, UNITEN. …Unified Modeling Language.
Object Oriented Programming and Data Abstraction Earl Huff Rowan University.
COP 4331 – OOD&P Lecture 7 Object Concepts. What is an Object Programming language definition: An instance of a class Design perspective is different.
Unified Modeling Language. What is UML? Standard language for specifying, visualizing, constructing, and documenting the artifacts of software systems,
Object-oriented programming (OOP) is a programming paradigm using "objects" – data structures consisting of data fields and methods together with their.
UML Diagrams By Daniel Damaris Novarianto S..
Business System Development
Course Outcomes of Object Oriented Modeling Design (17630,C604)
Object-Oriented Analysis and Design
ניתוח ועיצוב מערכות תוכנה אביב 2014
UML Diagrams Jung Woo.
Software Architecture & Design Pattern
UML Class Diagrams: Basic Concepts
Chapter 20 Object-Oriented Analysis and Design
Understand and Use Object Oriented Methods
Chapter 22 Object-Oriented Systems Analysis and Design and UML
UML  UML stands for Unified Modeling Language. It is a standard which is mainly used for creating object- oriented, meaningful documentation models for.
Presentation transcript:

תרשים המחלקות ותרשים העצמים 1

חלק שלישי: ניתוח ועיצוב מערכות מידע באמצעות שימוש ב-UML ומתודולוגיית ה-Unified Process (UP) E1 3 E2 2

Outline UML Introduction Class Diagram Class Association Self association Aggregation & Composition Dependency Object Diagram Association Class Diagram: Qualifiers Class Diagram: Association Class Class Diagram: Inheritance (Generalization) 3

UML Introdcution - Modeling A model is a simplification of reality. Through modeling we achieve four aims: 1. Models help us to visualize a system as it is or as we want it to be. 2. Models permit us to specify the structure or behavior of a system. 3. Models give us a template that guides us in constructing a system. 4. Models document the decisions we have made. 4

UML Introdcution Donald Bell, Staff, IBM. 15 Jun 2003: Way back in the late twentieth century to be exact -- the Object Management Group (OMG) released the Unified Modeling Language (UML). One of the purposes of UML was to provide the development community with a stable and common design language that could be used to develop and build computer applications. UML brought forth a unified standard modeling notation that IT professionals had been wanting for years. Using UML, IT professionals could now read and disseminate system structure and design plans -- just as construction workers have been doing for years with blueprints of buildings. 5

UML – Unified Modeling Language Visualizing, specifying, constructing, and documenting object- oriented systems is exactly the purpose of the UML. Exactly like architects blueprints. The constructing part is debatable. You already know how to speak it (Object-Oriented); here you will learn to read and exercise writing it. 6

The Diagrams of UML 2.0 Class diagram (s) Object diagram (s) Sequence diagram (i) State machine (b) Use Case diagram (f) Package diagram (s) These ones – we’ll see… Interaction diagram (i) Communication diagram (i) Timing diagram (i) Activity diagram (f) Component diagram (s) Composite diagram (s) Deployment diagram (s) …these ones – we won’t. 7 Classification of diagrams: (s) – structure (b) – behavior (f) – functional (i) – interaction

Class Diagram Definition: A class diagram is a graphic presentation of the static view that shows a collection of declarative (static) model elements, such as classes, types, and their content, and relationships. 8

Class Diagram Basic Elements: Class Elements Class Name Typed Attributes Typed Methods Visual Representation 9 A class is a description of a set of objects that share the same attributes, operations, relationships, and semantics.

Class Diagram Basic Elements: Association Elements Association Name Roles’ name Multiplicity a a..b a..* Visual Presentation 10 Association - a structural relationship that specifies that objects of one thing (class) are connected to objects of another. Aggregation - an association between two classes or components defined as “is part of”. Composition - a strong form of aggregation. name -role multiplicity Association

Class Diagram Basic Elements: Self Association Association can be between a class and itself. Recursive data structures, self-reference… Examples: Class Inheritance and Polymorphism, University Courses with Pre- Requisites. How would you model a nodes-and-edges graph? 11

Class Diagram Basic Elements: Composition Composition has exactly two rules which differ it from ordinary associations: A constituent part can belong to exactly one assembly. Once a constituent part has been assigned an assembly, it has a coincident lifetime with the assembly. 12

Class Diagram Basic Elements: Aggregation Aggregation… … is a “Modeling Placebo” – does not have any actual semantics. …would be treated just like association in code generation, model analysis, etc. 13

Wrong! Right! 14 Class Diagram Basic Elements: Association – Aggregation and Composition

Dependencies - is a relationship that states that one thing (class) uses the information and services of another thing (class). Underline is the notation for static operation/attributes. Some patterns reduce dependencies usage to a minimum. 15 Class Diagram Basic Elements: Dependency

חברת טיולים מארגנת טיולים מסוגים שונים. לכל טיול יש שם, רשימת ערים לביקור, תאריך יציאה ותאריך חזרה. עיר מוגדר ע " י שם העיר, מדינה, מספר ימי לביקור ופרטיו של המדריך ( ת. ז, שם וכתובת ). מדריך יכול להדריך בערים שונים, אך לכל עיר יכול להיות מדריך אחד בלבד. עבור כל טיול מנהלים רשימת מטיילים. מטייל מוגדר ע " י ת. ז, שם, רשימת טלפונים ( קוד, מספר ) ומחיר לטיול. מה יותר מובן ( הסיפור או הדיאגראמה )? 1..* 0..* 1..* 1 0..* 1 דוגמה 1 - חברת טיולים 16

באוניברסיטה ניתנים קורסים. כל קורס יכול להיות מורכב ממספר סמינרים ( אך לא חייב ). לסמינר משובצים סטודנטים. כל סטודנט חייב להשתתף לפחות בסמינר אחד. עוזר ההוראה של הסמינר הוא סטודנט. roles ו - associations מאוד חשובים להבנת התרשים והמערכת ⇐ השתמשו בהם. ברירות המחדל של multiplicity מבלבלות ובעייתיות ⇐ ציינו במפורש את ה - multiplicity. 0..* 1..* 0..* takes section of 1 -teaching assistant assists 0..* -student דוגמה 2 - קורסים באוניברסיטה 17

Object Diagram It depicts objects and their relationships at a certain point in time, typically a special case of either a class diagram or a communication diagram [Scott W.Ambler]. It shows instances instead of classes. They are useful for explaining small pieces with complicated relationships, especially recursive relationships. [Randy Miller] It is closely linked to class diagram. Just as an object is an instance of a class, an object diagram could be viewed as an instance of a class diagram. It is used for testing and refining class diagram. 18

Elements Object Name Attributes Links Name Type Association Aggregation Composition Generalizations Dependencies Visual Presentation Why there is no multiplicity? 19 name link -role Object Diagram Basic Elements: Links and Associations

דוגמה 3 ( המשך מדוגמא 2) a) Right ODb) Wrong OD takes assists takes assists * 1..* 0..* takes section of 1 -teaching assistant assists 0..* -student

OD שגוי / תקין ? כמות ה -links לא יכולה לעלות / לגרוע על כמות ה - associations * 1..* 0..* takes section of 1 -teaching assistant assists 0..* -student דוגמה 3 ( המשך )

OD שגוי / תקין ? * 1..* 0..* takes section of teaching assistant assists 0..* -student דוגמה 4 {NAND} takes assists takes assists

Class Diagram: Qualifiers במדינה יש כמה ערים ולכולם שמות שונים - מה מהבאים הכי נכון ? a. b. c. 23

Class Diagram: Association Class An association class is an association whose links have identities. It is possible to define a association class if relationship between classes has additional properties. Association class constraint: A single instance of the association between any 2 instances of the associated class (the regular association constraint). An association class can have attributes. 24

Association Class – Definitive Example A rule of thumb Association classes are better for many to many relationships. 25 /etc/termcapreadJohn Doe /etc/termcapread-writeMary Brown /usr/does/.loginread-writeJohn Doe

עובדים משובצים לפרויקטים שונים בתפקידים שונים. יש לשמור את תיאור התפקיד ומשכורת של עובד פר פרויקט עליו הוא עובד. The constraint comes from the association semantics. 26 a) Class Diagramb) Object Diagram דוגמה 5 – עובדים בפרויקט

What do the diagrams describe ? a) b) c) 27

Class Diagram: Inheritance (Generalization) Inheritance models “is a” and “is like” relationship, enabling you to reuse existing data and code easily. The subclass inherits from super-class: Attribute Operation Relationship Interface 28

Class Diagram: Inheritance (Generalization) Some patterns: Create a conceptual subclass of a super-class when: 1. The subclass has additional attributes of interest. 2. The subclass has additional associations of interest. 3. The subclass concept is operated on, handled, reacted to, or manipulated differently than the super-class or other subclasses, in ways that are of interest. 4. The subclass concept represents an animate thing (for example, animal, robot) that behaves differently than the super-class or other subclasses, in ways that are of interest. 29

Class Diagram: Inheritance (Generalization) Create a conceptual super-class in a generalization relationship to subclasses when: 1. The potential conceptual subclasses represent variations of a similar concept. 2. The subclasses will conform to the 100% and Is-a rules. 3. All subclasses have the same attribute which can be factored out and expressed in the super-class. 4. All subclasses have the same association which can be factored out and related to the super-class. 30

Representing Abstract Concepts and their Concrete Manifestations What is a flight? The plane? The path? Both – but in two different contexts? So let’s represent it! 31