Software Modelling Class Diagram. Class Diagrams The main building block in object oriented modeling They are used both for general conceptual modeling.

Slides:



Advertisements
Similar presentations
UML and Classes, Objects and Relationships [1]
Advertisements

Object-oriented modeling Class/Object Diagrams
Chapter 22 Object-Oriented Systems Analysis and Design and UML Systems Analysis and Design Kendall and Kendall Fifth Edition.
2-1 © Prentice Hall, 2007 Chapter 2: Introduction to Object Orientation Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra, Joseph.
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 
Class Diagram & Object Diagram
7M822 UML Class Diagrams advanced concepts 15 September 2008.
©TheMcGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 1 Introduction to Object-Oriented Programming and Software Development.
2-1 © Prentice Hall, 2004 Chapter 2: Introduction to Object Orientation (Adapted) Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra,
PRJ566: PROJECT PLANNING AND MANAGEMENT Class Diagrams.
Unified Modeling Language
The Unified Modeling Language (UML) Class Diagrams.
Object-Oriented Analysis and Design
UML Diagrams Computer Science I.
UML Unified Modeling Language. What is UML? Unified Modeling Language (UML) is a standardized, general-purpose modeling language in the field of software.
1 A Student Guide to Object- Orientated Systems Chapter 4 Objects and Classes: the basic concepts.
OBJECT AND CLASES: THE BASIC CONCEPTS Pertemuan 8 Matakuliah: Konsep object-oriented Tahun: 2009.
Object Oriented Analysis & Design & UML (Unified Modeling Language)1 Part V: Design The Design Workflow Design Classes Refining Analysis Relationships.
Object-Oriented Modeling Chapter 10 CSCI CSCI 1302 – Object-Oriented Modeling2 Outline The Software Development Process Discovering Relationships.
Object-Oriented Software Development F Software Development Process F Analyze Relationships Among Objects F Class Development F Class Design Guidelines.
1 UML Basic Training. UML Basic training2 Agenda  Definitions: requirements, design  Basics of Unified Modeling Language 1.4  SysML.
CS3773 Software Engineering Lecture 04 UML Class Diagram.
7-1 © Prentice Hall, 2004 Chapter 7: Conceptual Data Modeling Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra, Joseph S. Valacich,
7-1 © Prentice Hall, 2007 Chapter 7: Conceptual Data Modeling Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra, Joseph S. Valacich,
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,
Programming Logic and Design Fourth Edition, Comprehensive Chapter 15 System Modeling with the UML.
Chapter 16 Applying UML and Patterns Craig Larman
1 Class Diagrams: Advanced Concepts. 2 Overview Class diagrams are the most commonly used diagrams in UML. Class diagrams are the most commonly used diagrams.
12 September, 2007Information System Design IT60105, Autumn 2007 Information System Design IT60105 Lecture 11 Class and Object Diagrams.
UML Class Diagrams 1 These lecture slides are copyright (C) Marty Stepp, They may not be rehosted, sold, or modified without expressed permission.
An Introduction to the Unified Modeling Language
Design Jon Walker. More UML ● What is UML again?
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.
CSCI-383 Object-Oriented Programming & Design Lecture 10.
Chapter 8 Specialization aka Inheritance. 2 Inheritance  Review of class relationships  Uses – One class uses the services of another class, either.
Chapter 8 Inheritance. 2  Review of class relationships  Uses – One class uses the services of another class, either by making objects of that class.
Chapter 12 Object-oriented design for more than one class.
UML Part 1: Class Diagrams. Introduction UML stands for Unified Modeling Language. It represents a unification of the concepts and notations presented.
Class diagrams Terézia Mézešová.
Chapter 2: Introduction to Object Orientation Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra, Joseph S. Valacich, Jeffrey A.
Chapter 3: Introducing the UML
Object Modeling THETOPPERSWAY.COM. Object Modelling Technique(OMT)  Building a model of an application domain and then adding implementation.
CLASS DIAGRAMS A classy approach to objects. The Basic Class Diagram  Class Name  Attributes (- indicates private each would have properties or accessor/mutator.
Object-Oriented Software Engineering Practical Software Development using UML and Java Modelling with Classes.
TK2023 Object-Oriented Software Engineering CHAPTER 11 CLASS DIAGRAMS.
Object Oriented Programming and Data Abstraction Earl Huff Rowan University.
UML Fundamental Elements. Structural Elements Represent abstractions in our system. Elements that encapsulate the system's set of behaviors. Structural.
WELCOME TO OUR PRESENTATION UNIFIED MODELING LANGUAGE (UML)
2-1 © Prentice Hall, 2004 Chapter 2: Introduction to Object Orientation Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra, Joseph.
 Class and Diagram  Representation of Class Name Attributes Operations  Visibility of Attributes and Operations.
CHAPTER
Object-Orientated Analysis, Design and Programming
Object-Oriented Modeling
Structural Modeling.
Object-Oriented Analysis and Design
Class Diagrams.
DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING
The Object Oriented Approach to Design
Object Oriented Analysis and Design
Software Engineering Lecture #11.
Understand and Use Object Oriented Methods
Business Analysis More on Classes Chris Russell O2.41
Chapter 22 Object-Oriented Systems Analysis and Design and UML
Object Oriented System Design Class Diagrams
Software Design Lecture : 36.
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:

Software Modelling Class Diagram

Class Diagrams The main building block in object oriented modeling They are used both for general conceptual modeling of the systematics of the application, and for detailed modeling translating the models into programming code The classes in a diagram represent both the main objects and/or interactions in the application and the objects to be programmed In the diagram these classes are represented with boxes which contain three parts

Class Diagrams A class with three sections. – The upper part holds the name of the class – The middle part contains the attributes of the class – The bottom part gives the methods or operations the class can take or undertake

Class Diagram

Attributes can have default values.

Steps followed Draw class symbol in the editor and name it List the class attributes List the class operations/methods Make the links and associations Give notations

Inheritance A very important concept in object-oriented design, inheritance, refers to the ability of one class (child class) to inherit the identical functionality of another class (super class), and then add new functionality of its own.

Inheritance (generalization)

Associations When you model a system, certain objects will be related to each other, and these relationships themselves need to be modelled for clarity. An association is a linkage between two classes. Associations are always assumed to be bi-directional; this means that both classes are aware of each other and their relationship. At either end of the line, you place a role name and a multiplicity value.

Association

Packages Inevitably, if you are modelling a large system or a large area of a business, there will be many different classes in your model. Managing all the classes can be a daunting task; therefore, UML provides an organizing element called a package. Packages enable modellers to organize the model's classes into namespaces, which is sort of like folders in a filing system. Dividing a system into multiple packages makes the system easier to understand, especially if each package represents a specific part of the system.

Packages

Interface In object-oriented programming (like Java) what the difference between Class and Interface? A class can have an actual instance of its type, whereas an interface must have at least one class to implement it!

Association Class In modelling an association, there are times when you need to include another class because it includes valuable information about the relationship that couldn’t be add to each side. For this you would use an association class that you tie to the primary association.

Association Class

Aggregation Aggregation is a special type of association used to model a "whole to its parts" relationship. In basic aggregation relationships, the lifecycle of a part class is independent from the whole class's lifecycle. To represent an aggregation relationship, you draw a solid line from the parent class to the part class, and draw an unfilled diamond shape on the parent class's association end

Composition Aggregation The composition aggregation relationship is just another form of the aggregation relationship, but the child class's instance lifecycle is dependent on the parent class's instance lifecycle. Notice that the composition relationship is drawn like the aggregation relationship, but this time the diamond shape is filled.

Reflexive Association A class can also be associated with itself, using a reflexive association. When a class is associated to itself, this does not mean that a class's instance is related to itself, but that an instance of the class is related to another instance of the class.

Visibility In object-oriented design, there is a notation of visibility for attributes and operations. UML identifies four types of visibility: public, protected, private, and package MarkVisibility Type +Public -Private #Protected ~Package

Visibility