CH3. Class Modeling Tae-Hoon Song. Michael Blaha, James Rumbaugh Object-Oriented Modeling and Design with UML SE LAB KAIST

Similar documents
Prepared By:Mitali sonar

OBJECT-ORIENTED MODELING AND DESIGN. Class Modeling

UNIT 1 INTRODUCTION, MODELING CONCEPTS, CLASS MODELING Dec.09/Jan.10

Using High-Level Conceptual Data Models for Database Design A Sample Database Application Entity Types, Entity Sets, Attributes, and Keys

Introduction to Software Engineering. 5. Modeling Objects and Classes

NOTES ON OBJECT-ORIENTED MODELING AND DESIGN

S T R U C T U R A L M O D E L I N G ( M O D E L I N G A S Y S T E M ' S L O G I C A L S T R U C T U R E U S I N G C L A S S E S A N D C L A S S D I A

Announcement. Agenda 7/31/2008. Polymorphism, Dynamic Binding and Interface. The class will continue on Tuesday, 12 th August

Chapter 4. Enhanced Entity- Relationship Modeling. Enhanced-ER (EER) Model Concepts. Subclasses and Superclasses (1)

Object-Oriented Software Engineering Practical Software Development using UML and Java

3. Object-Oriented Databases

Suggested answers are provided below. These answers are presented top-down, left to right.

UML 2.0 UML 2.0. Scott Uk-Jin Lee. Division of Computer Science, College of Computing Hanyang University ERICA Campus

OOAD - OBJECT MODEL. The concepts of objects and classes are intrinsically linked with each other and form the foundation of object oriented paradigm.

For 100% Result Oriented IGNOU Coaching and Project Training Call CPD TM : ,

Modelling with Classes. CITS1220 Software Engineering

Object-Oriented Concepts and Principles (Adapted from Dr. Osman Balci)

8.0. Classes and Classification In the real world

SE 1: Software Requirements Specification and Analysis

OBJECT-ORIENTED MODELING AND DESIGN. Introduction

UML class diagrams. Giuseppe Lipari June 8, Scuola Superiore Sant Anna Pisa

The OO Solution. Objects

Object-Oriented Introduction

PROGRAMMING LANGUAGE 2

Lecturer: Sebastian Coope Ashton Building, Room G.18 COMP 201 web-page:

Object-Oriented Systems Development: Using the Unified Modeling Language

Chapter No. 2 Class modeling CO:-Sketch Class,object models using fundamental relationships Contents 2.1 Object and Class Concepts (12M) Objects,

Introduction to Software Engineering. 5. Modeling Objects and Classes

Database Management Systems. Chapter 2 Part 2

Copyright 2016 Ramez Elmasri and Shamkant B. Navathe

Object-Oriented Software Engineering Practical Software Development using UML and Java. Chapter 5: Modelling with Classes

Chapter 5 Object-Oriented Programming

Modellistica Medica. Maria Grazia Pia, INFN Genova. Scuola di Specializzazione in Fisica Sanitaria Genova Anno Accademico

THE ENHANCED ER (EER) MODEL CHAPTER 8 (6/E) CHAPTER 4 (5/E)

Big Java Late Objects

History of object-oriented approaches

Object-Oriented Systems Analysis and Design Using UML

Chapter 10. Object-Oriented Analysis and Modeling Using the UML. McGraw-Hill/Irwin

Class modelling (part 2)

CHAPTER 9 DESIGN ENGINEERING. Overview

Chapter 11 Object and Object- Relational Databases

Introduction to UML. Danang Wahyu utomo

COIS Databases

A - 1. CS 494 Object-Oriented Analysis & Design. UML Class Models. Overview. Class Model Perspectives (cont d) Developing Class Models

Chapter 6: Entity-Relationship Model

Database Applications (15-415)

LAB 2 Notes. Conceptual Design ER. Logical DB Design (relational) Schema Refinement. Physical DD

UML & OO FUNDAMENTALS CSCI 4448/5448: OBJECT-ORIENTED ANALYSIS & DESIGN LECTURE 3 08/30/2011

Object-oriented modeling and design

Chapter 6: Entity-Relationship Model. The Next Step: Designing DB Schema. Identifying Entities and their Attributes. The E-R Model.

Chapter 8 The Enhanced Entity- Relationship (EER) Model

UML Modeling I. Instructor: Yongjie Zheng September 3, CS 490MT/5555 Software Methods and Tools

CS/IT Secure Software Construction

The Next Step: Designing DB Schema. Chapter 6: Entity-Relationship Model. The E-R Model. Identifying Entities and their Attributes.

Credit where Credit is Due. Lecture 4: Fundamentals of Object Technology. Goals for this Lecture. Real-World Objects

Chapter 6: Entity-Relationship Model

Chapter 8: Enhanced ER Model

Metamodeling. Janos Sztipanovits ISIS, Vanderbilt University

Object-oriented design. More UML

OBJECT ORIENTED MODELLING & DESIGN 1

Software Engineering Lab Manual

Chapter (4) Enhanced Entity-Relationship and Object Modeling

Introduction to UML What is UML? Motivations for UML Types of UML diagrams UML syntax Descriptions of the various diagram types Rational Rose (IBM.. M

II. Data Models. Importance of Data Models. Entity Set (and its attributes) Data Modeling and Data Models. Data Model Basic Building Blocks

Basic Structural Modeling. Copyright Joey Paquet,

LABORATORY 1 REVISION

Class modelling (part 2)

Building custom components IAT351

REVIEW OF THE BASIC CHARACTERISTICS OF OBJECT ORIENTATION

Object-Oriented Analysis and Design

06. Analysis Modeling

UML & OO Fundamentals. CSCI 4448/5448: Object-Oriented Analysis & Design Lecture 3 09/04/2012

BBM 102 Introduction to Programming II Spring Inheritance

ENCAPSULATION AND POLYMORPHISM

Unit3: Java in the large. Prepared by: Dr. Abdallah Mohamed, AOU-KW

Chapter3: Introduction to Classes and Objects

Object-Oriented Programming in C++/Handout 01 Page 1 of 8

Object Oriented Software Development CIS Today: Object Oriented Analysis

Polymorphism and Inheritance

Object Oriented Modeling and Design

Object-Oriented Design

Object-Oriented Design and Modeling Using the UML

Introduction to Computer Programming for Non-Majors

Object-Oriented Analysis, Design and Implementation. Case Study Part II

Object Modeling. Entity-Relationship (ER) diagrams (1976) Object Modelling Technique (OMT) diagrams (1991)

Introduction to Computer Programming for Non-Majors

Chapter 2: Entity-Relationship Model

Introduction to Object-Oriented Programming

COSC 3351 Software Design. An Introduction to UML (I)

OBJECT ORIENTED MODELING AND DESING Subject Code: 06CS71 I.A. Marks : 25 Hours/Week : 04 Exam Hours: 03 Total Hours : 52 Exam Marks: 100

Advanced UML Class Models

System Concepts and Architecture. Rose-Hulman Institute of Technology Curt Clifton

OO System Models Static Views

Object-Oriented Programming

Object-Oriented Analysis and Design

Unified Modeling Language (UML)

CS111: PROGRAMMING LANGUAGE II

Copyright 2016 Ramez Elmasri and Shamkant B. Navathe

Sommerville Chapter 7 Fowler Chapters 1, 3, 5, and 6. Conceptual Modeling and Class Diagrams

Static Modeling. SWE 321 Fall2014

Transcription:

SE LAB KAIST CH3. Class Modeling Michael Blaha, James Rumbaugh Object-Oriented Modeling and Design with UML 2006-04-12 Tae-Hoon Song Software Engineering Lab 1

Contents Introduction Background Object and class concepts Link and association concepts Generalization and inheritance Navigation of class models Summary 2006-04-12 2/23

Introduction Object-oriented modeling and design Way of thinking about problems using models organized around real-world concepts Class modeling Describe the static data of objects and their relationships to one another Define each concept Present the corresponding UML notation 2006-04-12 3/23

Background Model Abstraction of something for purpose of understanding it before building it Viewpoints Class model Structure of objects in a system (class diagram) State model Aspects of an object that change over time (state diagram) Interaction model Objects in a system cooperate to achieve broader results (Use case/sequence/activity diagram) 2006-04-12 4/23

Object and class concepts (1/4) Object Concept, abstraction, or thing with identity Proper nouns or specific reference in problem description Class Group of objects with Same properties (attributes) Behavior (operations) Kinds of relationships Semantics 2006-04-12 5/23

Object and class concepts (2/4) Class diagrams Graphic notation for modeling classes and their relationships Object diagrams Graphic notation for individual objects and their relationships Rookie TaeHoon:Rookie SeokJoong:Rookie :Rookie Class Objects 2006-04-12 6/23

Object and class concepts (3/4) Value : piece of data Attribute : value for each object Operation Function or procedure that may be applied to or by objects in a class All objects in a class share the same operations Class Rookie name:string birthdate:date ( types ) TaeHoon:Rookie name= Tae Hoon ( attributes ) birthdate=6 Dec 1975 ( values ) Object enroll ( operation ) 2006-04-12 7/23

Object and class concepts (4/4) Summary of notation for class ClassName attributename1 : datatype1 = defaultvalue1 attributename2 : datatype2 = defaultvalue2 operationname1 ( argumentlist1 ) : resulttype1 operationname2 ( argumentlist2 ) : resulttype2 2006-04-12 8/23

Link and association concepts (1/8) Links and associations Link Physical or conceptual connection among objects Instance of an association Association Group of links with common structure and common semantics Set of potential links Links and associations : Verb in problem statements 2006-04-12 9/23

Link and association concepts (2/8) Links and associations (Cont d) Class diagram (Association) Rookie name OwnStock * * (Association name) Company name Object diagram (Link) Hoon:Rookie name= Hoon Joong:Rookie name= Joong Seok:Rookie name= Seok MS:Company name= MS SUN:Company name= SUN 2006-04-12 10/23

Link and association concepts (3/8) Multiplicity Constrain the number of related objects Assign a multiplicity to an association end Class diagram Husband name HasWife 1 1 (Multiplicity) name Wife Object diagram Hoon:Husband name= Hoon Seok:Husband name= Seok Lyn:Wife name= Lyn Hee:Wife name= Hee 2006-04-12 11/23

Link and association concepts (4/8) Association end names Each end of an association can have a name Convenience for traversing associations (Association end names) Person * employee employer WoksFor 0..1 Company employee Taehoon Seokjoong Youngseok employer MS MS IBM 2006-04-12 12/23

Link and association concepts (5/8) Ordering Indicate an ordered set of objects Provide an explicit order Permitted only for binary associations Screen 1 {ordered} VisibleOn * Window 2006-04-12 13/23

Link and association concepts (6/8) Bags and Sequences Permit multiple links for a pair of objects Bag Collection of elements with duplicates allowed Sequence Ordered bag Permitted only for binary associations Itinerary * {sequence} * Airport 2006-04-12 14/23

Link and association concepts (7/8) Association classes Derive identity from instances of the constituent classes Have attributes and operations Participate in associations User (Association class) * Authorization priority startsession (Dash line) Workstation 2006-04-12 15/23 * home * 1 (Participating in an association) Workstation

Link and association concepts (8/8) Qualified Associations Disambiguate the objects for a many association end Select among the target objects, reducing the effective multiplicity, from many to one 1 Bank * Account (Not qualified) accountnumber Bank accountnumber 1 0..1 Account (Qualified) (Qualifier) 2006-04-12 16/23

Generalization and inheritance (1/3) Definition Generalization Relationship between a class (the superclass) and one or more variations of the class (the subclass) Inheritance Each subclass has the features of its superclass Use of generalization Support for polymorphism Structure the description of objects Enable reuse of code 2006-04-12 17/23

Generalization and inheritance (2/3) Overriding features Refines and replaces (Subclass feature superclass feature) To specify behavior that depends on the subclass To tighten the specification of a feature To improve performance 2006-04-12 18/23

Generalization and inheritance (3/3) Vehicle engine door wheel displacement move (Generalization) Tank gun cannon fire move box bos bring Truck (Overriding Feature) jack bos lift Crane 2006-04-12 19/23

Navigation of class models (1/3) Navigation Express the behavior of navigating among classes Exercise a model and uncover hidden flaws and omissions Traverse the constructs in class models with OCL Object Constraint Language (OCL) Attributes Traverse from an object to an attribute value Vehicle. displacement 2006-04-12 20/23

Navigation of class models (2/3) Object Constraint Language (OCL) (Cont d) Operations Invoke an operation for an object Tank. Fire Operate on entire collections Vehicle. Tank. gun -> sum ( ) Simple association Traverse an association to a target end Person. employee Qualified association Make a more precise traversal Bank. accountnumber [060411] 2006-04-12 21/23

Navigation of class models (3/3) Object Constraint Language (OCL) (Cont d) Association class Find the constituent objects or the multiple links of an association class Generalization Traverse a generation hierarchy Filters Filter the objects in a set Vehicle. displacement -> select ( amount > cc 2000 ) 2006-04-12 22/23

Summary Class model Static data structure of objects and their relationships to one another Concepts Object : concept, abstraction, identified thing Class : group of objects (attribute, behavior, relations) Link and association : set of potential links Generalization : relationship between the superclass and the subclasses Navigation of class model : behavior of navigation among classes 2006-04-12 23/23

The end Thank you 2006-04-12 24/23