Identifying Object Relationships, Attributes and Methods.

Slides:



Advertisements
Similar presentations
CLASS INHERITANCE Class inheritance is about inheriting/deriving properties from another class. When inheriting a class you are inheriting the attributes.
Advertisements

Object Oriented Programming. Object Oriented Data and operations are grouped together Account Withdraw Deposit Transfer Interface: Set of available operations.
Java Programming Abstract classes and Interfaces.
Visual Basic: An Object Oriented Approach 2 – Designing Software Systems.
UML Class Diagram. UML Class Diagrams2 Agenda What is a Class Diagram? Essential Elements of a UML Class Diagram Tips.
Syntax & terminology review While the following slides are not exactly what we did on the board (object diagrams are not shown here) they cover most of.
1 Software Testing and Quality Assurance Lecture 12 - The Testing Perspective (Chapter 2, A Practical Guide to Testing Object-Oriented Software)
UML – Class Diagrams.
Essentials of class models. 2 A very simple class model In UML, a class is shown in a class diagram as a rectangle giving its name.
Slide 1 Systems Analysis & Design CS183 Spring Semester 2008 Dr. Jonathan Y. Clark Course Website:
Object Classes In UML. Object Concepts What is an object? How do objects communicate? How is an object’s interface defined? What have objects to do with.
7M701 1 Class Diagram advanced concepts. 7M701 2 Characteristics of Object Oriented Design (OOD) objectData and operations (functions) are combined 
 2008 Pearson Education, Inc. All rights reserved Introduction to Classes and Objects.
 2008 Pearson Education, Inc. All rights reserved Introduction to Classes and Objects.
Modelling classes Drawing a Class Diagram. Class diagram First pick the classes –Choose relevant nouns, which have attributes and operations. Find the.
The Unified Modeling Language (UML) Class Diagrams.
CS 2511 Fall UML Diagram Types  2 Main Types Structure Diagrams ○ Class Diagrams ○ Component Diagrams ○ Object Diagrams Behavior Diagrams ○
 2008 Pearson Education, Inc. All rights reserved (Optional) Software Engineering Case Study: Identifying the Classes in the ATM Requirements.
Object-oriented Design CSCI 5801: Software Engineering.
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.
1 Java Inheritance. 2 Inheritance On the surface, inheritance is a code re-use issue. –we can extend code that is already written in a manageable manner.
Object-Oriented Software Development F Software Development Process F Analyze Relationships Among Objects F Class Development F Class Design Guidelines.
Object oriented classification Classification is the process of checking to see if an object belongs to a category or a class, is regarded as a basic attribute.
CS3773 Software Engineering Lecture 04 UML Class Diagram.
Class Diagrams Identifying and representing Classes Object Web, Bapayya Choudhary Maganti.
Unit 1 INTRODUCTION TO MODELING AND CLASS MODEL Ref : L7-UML.PDF.
بسم الله الرحمن الرحيم ” اللهم أنت ربي لا إله إلا أنت خلقتني و أنا عبدك وأنا على عهدك ووعدك ما استطعت ، أعوذ بك من شر ما صنعت ، أبوء لك بنعمتك على و أبوء.
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.
Lecture 6: Structural Modeling
1 Introduction to Classes and Objects Chapter 3 Introduction to Classes and Objects Chapter 3.
Design Model Lecture p6 T120B pavasario sem.
Domain Modeling Yonglei Tao.
Class Modeling Design Class diagram. Classes The term “class ” refers to a group of objects that share a common attributes and common behaviour (operations).
UML Class Diagram. A class diagram shows 1.Classes 2.The relationships between them.
CMSC 202 A Design Exercise. 2 OO design activities Finding the Objects Defining the responsibilities –Services –Attributes Discovering relationships.
Identifying Object Relationships, Attributes, and Methods
CS212: Object Oriented Analysis and Design Lecture 33: Class and Sequence Diagram.
MODULE:VII OBJECT ANALYSIS: CLASSIFICATION
Topics Inheritance introduction
Class diagrams Terézia Mézešová.
Inheritance and Aggregation Lecture References Inheritance from Lecture Notes on Object Oriented Programming with C++. Available at
UML Fundamental Elements. Structural Elements Represent abstractions in our system. Elements that encapsulate the system's set of behaviors. Structural.
BTS430 Systems Analysis and Design using UML Design Class Diagrams (ref=chapter 16 of Applying UML and Patterns)
Identification of Classes. Object Oriented Analysis (OOA) OOA is process by which we identify classes that play role in achieving system goals & requirements.
Class Diagrams Revisited. Parameterized Classes Parameterized Classes - are used to represent relationships between templates.
Inf 43: Introduction to Software Engineering May 7, 2016.
COP 3330 Notes 4/13. Today’s Topics UML Class Diagrams.
Identifying Object Relationships, Attributes, and Methods.
 Class and Diagram  Representation of Class Name Attributes Operations  Visibility of Attributes and Operations.
Identifying Object Relationships, Attributes and Methods
Unified Modeling Language (UML)
Object-oriented and Structured System Models
COMP 2710 Software Construction Class Diagrams
Structural Modeling.
UNIT-III object-oriented analysis process
Abstract descriptions of systems whose requirements are being analysed
OBJECT RELATIONSHIPS, ATTRIBUTES, AND METHODS
Software Engineering System Modeling Chapter 5 (Part 2) Dr.Doaa Sami
Software Engineering System Modeling Chapter 5 (Part 2) Dr.Doaa Sami
Inheritance B.Ramamurthy 11/7/2018 B.Ramamurthy.
Chapter 10 Thinking in Objects
Domain Class Diagram Chapter 4 Part 2 pp
Software Engineering Lecture #11.
UML Class Diagram.
Unified Modelling Language
Software Engineering System Modeling Extra examples Dr.Doaa Sami
Understand and Use Object Oriented Methods
BCA-II Object Oriented Programming using C++
Object Oriented System Design Class Diagrams
Presentation transcript:

Identifying Object Relationships, Attributes and Methods.

Guidelines for Identifying Association Class A and B are associated if An object of class A sends a message to an object of class B An object of class A creates an object of class B An object of class A has an attribute whose values are objects of class B An object of class A receives a message with an object of class B as an argument 2

Guidelines for Identifying a Super-sub Relationship Top-down  Look for noun phrases composed of adjectives in a class name. Bottom up  Look for classes with similar attributes or methods

Identifying the Composition & Aggregation/a-part-of Relationship Composition - a physical whole is constructed from physical parts (Assembly)  Eg1: Building constructed by bricks, stones  Eg2: ATM with Card Reader, Console, Printer, Key Pad Aggregation - a physical whole encompasses but is not constructed from physical parts (Container)  Eg1: Building with Furniture, Appliances  Eg2: Car with AC and Radio Collection-member – a conceptual whole encompasses parts that may be physical or conceptual  Eg: Employer and employees

Case Study – ATM Identifying the Class & Relationship

Case Study – ATM Identifying the Class, Relationship & Attribute

Case Study – ATM Identifying the Class, Relationship, Attribute & Method

Example on Identifying Object Relationships.

Object Relationship in Code Association public class A { public void doSomething(B b) { } } Aggregation public class A { private B b1; public void setB(B b) { b1 = b; } } Composition public class A { private B b1; public A() { b1 = new B(); }

Object Relationship in Code Generalization public class A {... } // class A public class B extends A {.... } // class B Realization public interface A {... } // interface A public class B implements A {... } // class B