Unit 1 INTRODUCTION TO MODELING AND CLASS MODEL Ref : L7-UML.PDF.

Slides:



Advertisements
Similar presentations
UML an overview.
Advertisements

UML Class Diagram. UML Class Diagrams2 Agenda What is a Class Diagram? Essential Elements of a UML Class Diagram Tips.
Lecturer: Sebastian Coope Ashton Building, Room G.18 COMP 201 web-page: Lecture.
Chapter 15: System Modeling with UML
Chapter 14 (Web): Object-Oriented Data Modeling
Essentials of interaction diagrams Lecture 23 & 24.
Essentials of interaction diagrams Lecture Outline Collaborations Interaction on collaboration diagrams Sequence diagrams Messages from an object.
What is UML? A modeling language standardized by the OMG (Object Management Group), and widely used in OO analysis and design A modeling language is a.
7M701 1 Class Diagram advanced concepts. 7M701 2 Characteristics of Object Oriented Design (OOD) objectData and operations (functions) are combined 
© Copyright Eliyahu Brutman Programming Techniques Course.
Chapter 14: Object-Oriented Data Modeling
Unified Modeling Language
Unified Modeling Language
Object-Oriented Analysis and Design
UML Diagrams Computer Science I.
Introduction to UML CS A401. What is UML? Unified Modeling Language –OMG Standard, Object Management Group –Based on work from Booch, Rumbaugh, Jacobson.
1 Announcements Research Paper due Friday November 19 For Wednesday read
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.
Programming in Java Unit 3. Learning outcome:  LO2:Be able to design Java solutions  LO3:Be able to implement Java solutions Assessment criteria: 
Lab 04.
CS3773 Software Engineering Lecture 04 UML Class Diagram.
CHAPTER 13 (ONLINE): OBJECT-ORIENTED DATA MODELING © 2013 Pearson Education, Inc. Publishing as Prentice Hall 1 Modern Database Management 11 th Edition.
Databases : Data Modeling 2007, Fall Pusan National University Ki-Joune Li.
Programming Logic and Design Fourth Edition, Comprehensive Chapter 15 System Modeling with the UML.
CHAPTER 13: OBJECT-ORIENTED DATA MODELING (OVERVIEW) © 2013 Pearson Education, Inc. Publishing as Prentice Hall 1 Modern Database Management 11 th Edition.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 14 Slide 1 Object-oriented Design.
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.
UML Diagrams: The Static Model Class Diagrams. The Static Model Define the static structure of the logical model Represent classes, class hierarchies.
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.
1 Introduction to Classes and Objects Chapter 3 Introduction to Classes and Objects Chapter 3.
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 Analysis and Design Class and Object Diagrams.
Introduction to UML CS A470. What is UML? Unified Modeling Language –OMG Standard, Object Management Group –Based on work from Booch, Rumbaugh, Jacobson.
advanced data modeling
1 Technical & Business Writing (ENG-715) Muhammad Bilal Bashir UIIT, Rawalpindi.
Chapter 4 Extended Entity-Relationship (EER)Model Incorporates Set-subset Relationships Incorporates Generalization Hierarchies Constraints: Coverage Constraints:
CS212: Object Oriented Analysis and Design Lecture 33: Class and Sequence Diagram.
UML Class Diagram notation Indicating relationships between classes SE-2030 Dr. Mark L. Hornick 1.
Class diagrams Terézia Mézešová.
Chapter 3: Introducing the UML
CSCI 3428: Software Engineering Tami Meredith UML Unified Modeling Language.
Object Modeling THETOPPERSWAY.COM. Object Modelling Technique(OMT)  Building a model of an application domain and then adding implementation.
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.
UML CSE 470 : Software Engineering. Unified Modeling Language UML is a modeling language to express and design documents, software –Particularly useful.
UML CSE 470 : Software Engineering. Unified Modeling Language UML is a modeling language to express and design documents, software –Particularly useful.
CHAPTER
Introduction to UML.
UML Diagrams: Class Diagrams The Static Analysis Model
Object-Oriented Modeling
UML Diagrams By Daniel Damaris Novarianto S..
Business System Development
Introduction to UML.
Chapter 5: Structural Modeling
Object-Oriented Analysis and Design
Class Diagrams.
Entity-Relationship Model
Class diagram Description
UML Diagrams Jung Woo.
UML Diagrams: The Static Model Class Diagrams
Seminar 3 UML Class Diagram.
Lec 3: Object-Oriented Data Modeling
Software Engineering Lecture #11.
Systems Analysis and Design With UML 2
Chapter 20 Object-Oriented Analysis and Design
Object Oriented System Design Class Diagrams
Presentation transcript:

Unit 1 INTRODUCTION TO MODELING AND CLASS MODEL Ref : L7-UML.PDF

Class diagram

UML Class Notation Lines or arrows between classes indicate relationships – Association A relationship between instances of two classes, where one class must know about the other to do its work, e.g. client communicates to server indicated by a straight line or arrow – Aggregation An association where one class belongs to a collection Indicated by an empty diamond on the side of the collection

UML Class Notation – Composition Strong form of Aggregation Lifetime control; components cannot exist without the aggregate Indicated by a solid diamond on the side of the collection – Inheritance An inheritance link indicating one class a superclass relationship Indicated by triangle pointing to superclass

Binary Association myB.service();myA.doSomething(); Binary Association: Both entities “Know About” each other Optionally, may create an Associate Class

Unary Association A knows about B, but B knows nothing about A Arrow points in direction of the dependency myB.service();

Aggregation Aggregation is an association with a “collection-member” relationship void doSomething() aModule.service(); Hollow diamond on the Collection side No sole ownership implied

Composition Composition is Aggregation with: -Lifetime Control (owner controls construction, destruction) -Part object may belong to only one whole object Filled diamond on side of the Collection members[0] = new Employee(); … delete members[0];

Inheritance Standard concept of inheritance class B extends A … Base Class Derived Class

UML Multiplicities MultiplicitiesMeaning 0..1 zero or one instance. The notation n.. m indicates n to m instances. 0..* or * no limit on the number of instances (including none). 1exactly one instance 1..*at least one instance Links on associations to specify more details about the relationship

UML Class Example

Association Details Can assign names to the ends of the association to give further information +getName() :string +setName() -calcInternalStuff(in x:byte,in y:decimal) -Name:string +ID:long #Salary:double -adfaf:bool Employee -members:Employee Team-group 1 -individual *

Static vs. Dynamic Design Static design describes code structure and object relations – Class relations – Objects at design time – Doesn’t change Dynamic design shows communication between objects – Similarity to class relations – Can follow sequences of events – May change depending upon execution scenario – Called Object Diagrams

Object Diagrams Shows instances of Class Diagrams and links among them – An object diagram is a snapshot of the objects in a system At a point in time With a selected focus – Interactions – Sequence diagram – Message passing – Collaboration diagram – Operation – Deployment diagram

Object Diagrams Format is – Instance name : Class name – Attributes and Values – Example:

Objects and Links Can add association type and also message type

Advanced object & class concepts Enumerations: Enumeration is a datatype that has finite set of values e.g. {MR., Mrs.,Ms., Dr.} While constructing a model, carefully note enumerations. Restrict data to legitimate values- pick list Do not use generalization to capture enum values

> Suit Spades Clubs Hearts Diamonds

Advanced object & class concepts: Multiplicity Constraint on cardinality of a set Also applies to attributes Specifies no of possible values for each instantiation of an attribute If not specified, assume single mandatory value Person Name : string[1] Address: string [1..*] Phone number : string[*]

Advanced object & class concepts Scope Visibility : package ~

Package Diagrams To organize complex class diagrams, you can group classes into packages. A package is a collection of logically related UML elements Notation – Packages appear as rectangles with small tabs at the top. – The package name is on the tab or inside the rectangle. – The dotted arrows are dependencies. One package depends on another if changes in the other could possibly force changes in the first. – Packages are the basic grouping construct with which you may organize UML models to increase their readability

Package Example DispatcherInterface Notification IncidentManagement

More Package Examples

References