Object Oriented Analysis and Design

Slides:



Advertisements
Similar presentations
UML (cont.) “The Unified Modeling Language User Guide” by G. Booch, J. Rumbaugh and I. Jacobson ● Classes ● Relationships ● Class diagrams ● Examples.
Advertisements

Object-oriented modeling Class/Object Diagrams
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.
UML Class Diagram. UML Class Diagrams2 Agenda What is a Class Diagram? Essential Elements of a UML Class Diagram Tips.
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 Diagram and Packages Written by Zvika Gutterman Adam Carmi.
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 
2-1 © Prentice Hall, 2004 Chapter 2: Introduction to Object Orientation (Adapted) Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra,
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.
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.
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.
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.
© 2009 Pearson Education, Inc. Publishing as Prentice Hall 1 Chapter 15: Object-Oriented Data Modeling Modern Database Management 9 h Edition Jeffrey A.
Databases : Data Modeling 2007, Fall Pusan National University Ki-Joune Li.
© 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.
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.
An Introduction to the Unified Modeling Language
What is a Structural Model?
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.
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.
Object-Oriented Data Modeling
Design Model Lecture p6 T120B pavasario sem.
Relationships Relationships between objects and between classes.
Object Oriented Analysis: Associations. 2 Object Oriented Modeling BUAD/American University Class Relationships u Classes have relationships between each.
Chapter 16 UML Class Diagrams 1CS6359 Fall 2012 John Cole.
Object Modeling THETOPPERSWAY.COM. Object Modelling Technique(OMT)  Building a model of an application domain and then adding implementation.
ITEC0724 Modern Related Technology on Mobile Devices Lecture Notes #2 1.
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.
UML Fundamental Elements. Structural Elements Represent abstractions in our system. Elements that encapsulate the system's set of behaviors. Structural.
Software Modelling Class Diagram. Class Diagrams The main building block in object oriented modeling They are used both for general conceptual modeling.
2-1 © Prentice Hall, 2004 Chapter 2: Introduction to Object Orientation Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra, Joseph.
Modeling with UML – Class Diagrams
Unified Modeling Language (UML)
UML Diagrams: Class Diagrams The Static Analysis Model
Object-Oriented Modeling
Object-oriented and Structured System Models
UML Diagrams By Daniel Damaris Novarianto S..
Business System Development
OBJECT ORIENTED CONCEPT
Visit for more Learning Resources
Chapter 5: Structural Modeling
Object-Oriented Analysis and Design
Class Diagrams.
UML Diagrams Jung Woo.
DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING
UML Class Diagrams: Basic Concepts
UML Diagrams: The Static Model Class Diagrams
Identifying classes, Packages and drawing class Diagrams , Object Diagrams and composite structure diagrams Week 06.
System models October 5, 2005.
Lec 3: Object-Oriented Data Modeling
Software Engineering Lecture #11.
تحليل انظمة و تصميمها الوحدة الخامسة أ.محمد زكي شبير.
Systems Analysis and Design With UML 2
UML Class Diagram.
Object-Oriented Knowledge Representation
Unified Modelling Language
Copyright 2007 Oxford Consulting, Ltd
Class Diagrams Class diagram is basically a graphical representation of the static view of the system and represents different aspects of the application.
Class Diagram.
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:

Object Oriented Analysis and Design Class Diagrams and Object Diagrams

Class Collection of group of things that have the same attributes and the same behaviors

Class Diagram Class diagram describes the types of objects in the system and the various kinds of static relationships that exist among them. It also shows the attributes and services of a class and the constraints that apply to the way objects are connected.

Class -name : CHAR -dateOfBirth: DATE +getName () Patient Stereotype: Type of the Class; entity for Analysis. <<entity>> Name of the Class Patient -name : CHAR Attributes of the Class -dateOfBirth: DATE Operations of the Class +getName ()

Major Components Patient Doctor Class: With 3 Compartments Inheritance <<entity>> <<entity>> Patient Class: With 3 Compartments Inheritance Association Doctor Class Description Contains Attributes & Operations Multiplicity At each end Of Association Notes - - DoctorID : : Qual [ [ .. .. N N ] ] + + getDoctorDtls ( ( ) ) 1 .. N N

Class Diagram Name List of attributes List of methods All words start in capital No spaces List of attributes No capitals in first word All other words only start with capital No space List of methods Parentheses at the end

Class Diagram Indicating data type and default value

Class Diagram Function signature acceptCloths(c:String)int Function name acceptCloths Parameter : String type c Return value :type is int

Class Diagram Including constraints

Visibility + Public ‐ Private # Protected ~ Package

Stereotypes and Classes A Stereotype is a mechanism use to categorize classes. Primary class stereotypes in UML

Boundary Classes Provide the interface to a user or another system. Handles communication between system surroundings and the inside of the system User interface classes System interface classes Device interface classes

Entity Classes Fundamental building block which perform internal tasks Represent real world entity They correspond to database table

Control Classes Objects that mediate between boundaries and entities. Typically one control class per use case

Relationships Association Aggregation/Composition Generalization/Inheritance Dependency

Associations Link between classes

Multiplicity Type of relationship The number of objects from one class that relate with a single object in an associated class 1 Exactly one 0..* Zero or more 1..* One or more 0..1 Zero or one 5..8 Specific Range (5,6,7 or 8)

Class Diagram Multiplicity

Aggregation (Shared Association) Relationship between whole and it’ part Containing class with a diamonded single line and contained class

Composition(Not-Shared Association) Stronger type aggregation Each component in a composite can belong to just only one whole Child class's instance lifecycle is dependent on the parent class's instance lifecycle.

Aggregation Vs. Composition

Inheritance Base class or root class. leaf class Single inheritance No parents leaf class No children Single inheritance Single parent Multiple inheritance More than one parent

Inheritance Create hierarchy of classes Classes at the top of hierarchy known as super class Super classes holding the common information Sub classes inherit all the features of super classes

Generalization/ Specialization Create super class encapsulate structure and behavior common to number of classes Specialization Create sub class that represent refinement to super class. Specific structure and behavior are added to sub classes

Generalization/ Specialization Finding Super classes Needs abstract thinking Domain knowledge helpful Helps in creating reusable Classes Finding Subclasses Concrete lower level implementation thinking Helps in using reusable Classes Generalization Specialization

Example

Reflexive Relations Relationship of a class to itself Possible when a class has objects that can play a variety of roles

Example

Object Diagram Object diagram is an instance of a class diagram; it shows a snapshot of the detailed state of a system at a point in time

Object Diagram Also known as instance diagrams Useful for exploring real world examples of objects and the relationships between them.  It shows instances instead of classes. They are useful for explaining small pieces with complicated relationships

instanceName:ClassName Object Diagram Object diagram specify object name and values of the class attributes Name is underlined Name stars with simple letter Only first letter of other words are Capital instanceName:ClassName Object notation Example

Object Diagram Specifying values of attributes

Object Diagram Anonymous object Just means that don't supply a specific name for the object, although show the class it belongs to.

Object Diagram Example