Information System Design IT60105

Similar documents
UML. Design Principles.

Information System Design IT60105

Relationships between elements of sets occur in many contexts. Every day we deal with

Research on Object-Oriented Geographical Data Model in GIS

Information System Desig

An object-oriented design process. Weather system description. Layered architecture. Process stages. System context and models of use

Geographic Information Systems (GIS) in Environmental Studies ENVS Winter 2003 Session III

SUPPLEMENTARY MATERIAL (A)

Introduction to Coastal GIS

Vocabulary: powers of ten negative exponents scientific notation fractions decimals percents square roots absolute value number line

Trade Show Planning Timeline by Cory Ann Ellis

Agile modeling for INF5150

GEOG 508 GEOGRAPHIC INFORMATION SYSTEMS I KANSAS STATE UNIVERSITY DEPARTMENT OF GEOGRAPHY FALL SEMESTER, 2002

FACULTY OF SCIENCE ACADEMY OF COMPUTER SCIENCE AND SOFTWARE ENGINEERING OBJECT ORIENTED PROGRAMMING DATE 09/06/2014 SESSION 8:30-10:30

Geodatabase An Introduction

Solving Polynomial Systems in the Cloud with Polynomial Homotopy Continuation

CHAPTER 3 PROBABILITY: EVENTS AND PROBABILITIES

Clojure Concurrency Constructs, Part Two. CSCI 5828: Foundations of Software Engineering Lecture 13 10/07/2014

Page 1. Math Module 2: Negative Numbers, Proportions, and the Dreaded Fractions

4D information management system for road maintenance using GIS

Activities, Fragments and Intents

Welcome to NR502 GIS Applications in Natural Resources. You can take this course for 1 or 2 credits. There is also an option for 3 credits.

CHEMICAL INVENTORY ENTRY GUIDE

Map Application Progression

SCOPE & SEQUENCE. Algebra I

FUNDAMENTAL GEOGRAPHICAL DATA OF THE NATIONAL LAND SURVEY FOR GIS AND OFFICIAL MAPPING. Karin Persson National Land Survey S Gavle Sweden

1. Introduction to commutative rings and fields

Step-Indexed Biorthogonality: a Tutorial Example

4th year Project demo presentation

ENV208/ENV508 Applied GIS. Week 1: What is GIS?

QUESTIONS 1-46 REVIEW THE OBJECTIVES OF CHAPTER 2.

Computer Science Introductory Course MSc - Introduction to Java

MATH STUDENT BOOK. 8th Grade Unit 3

Design Patterns part I. Design Patterns part I 1/32

The new regulation REACH INTRODUCTION. Pedro Guerra

OBEUS. (Object-Based Environment for Urban Simulation) Shareware Version. Itzhak Benenson 1,2, Slava Birfur 1, Vlad Kharbash 1

Mathematical Practices

INF Models of concurrency

A Model of GIS Interoperability Based on JavaRMI

5. Many young insects look when they become adult insects. A. the same B. different

Comp 11 Lectures. Mike Shah. July 12, Tufts University. Mike Shah (Tufts University) Comp 11 Lectures July 12, / 33

Compiling Techniques

Qualitative Spatio-Temporal Reasoning & Spatial Database Design

Curriculum Scope & Sequence Subject/Grade Level: MATHEMATICS/GRADE 7 Course: MATH 7

CSE370: Introduction to Digital Design

GEOGRAPHICAL INFORMATION SYSTEMS. GIS Foundation Capacity Building Course. Introduction

2.1 Identifying Patterns

Outline. policies for the first part. with some potential answers... MCS 260 Lecture 10.0 Introduction to Computer Science Jan Verschelde, 9 July 2014

Information System Decomposition Quality

Geographic Systems and Analysis

Algebra 1. Statistics and the Number System Day 3

CS Java. Introduction to Java. Andy Mroczkowski Department of Computer Science Drexel University

Material Covered on the Final

E23: Hotel Management System Wen Yunlu Hu Xing Chen Ke Tang Haoyuan Module: EEE 101

mylab: Chemical Safety Module Last Updated: January 19, 2018

Midterm Exam. Kasetsart University Probability & Statistics for Software and Knowledge Engineers, 2 nd semester 2006

Practice Math Exam. Multiple Choice Identify the choice that best completes the statement or answers the question.

Vocabulary. A network is a set of objects. that are connected together by a. The vertices of a network are the. The arcs or edges of a network show

Geospatial Semantics. Yingjie Hu. Geospatial Semantics

PP - Work Centers HELP.PPBDWKC. Release 4.6C

LAB 2 - ONE DIMENSIONAL MOTION

GCSE METHODS IN MATHEMATICS

Dynamics of Ocean Structures Prof. Dr. Srinivasan Chandrasekaran Department of Ocean Engineering Indian Institute of Technology, Madras

Exploring the boundaries of your built and natural world. Geomatics

In grade school one draws factor trees. For example, here is a tree for the number 36,000:

Sequential Logic (3.1 and is a long difficult section you really should read!)

Number of People Contacted

SCHOOL OF ENGINEERING AND TECHNOLOGY COMPUTER LAB

GOVERNMENT GIS BUILDING BASED ON THE THEORY OF INFORMATION ARCHITECTURE

AN OBJECT-ORIENTED DATA MODEL FOR DIGITAL CARTOGRAPHIC OBJECT

PELLISSIPPI STATE COMMUNITY COLLEGE MASTER SYLLABUS NONCALCULUS BASED PHYSICS I PHYS 2010

M E R C E R W I N WA L K T H R O U G H

PHYSICS. Brian Pressley

June If you want, you may scan your assignment and convert it to a.pdf file and it to me.

Introduction to Informatics

Geodatabase An Introduction

Techniques of Java Programming

Mathematical Forms and Strategies

Algebra Performance Level Descriptors

Distributed Systems. Time, Clocks, and Ordering of Events

FIT100 Spring 01. Project 2. Astrological Toys

SINCE the introduction of System Engineering in

Introduction to Coastal GIS

Instructor: Amol Deshpande

Information System Design IT60105

Your Virtual Workforce. On Demand. Worldwide. COMPANY PRESENTATION. clickworker GmbH 2017

CERTIFICATE COURSE IN GEO-INFORMATICS 1 (GGFGIS7) 2016

This introduction is intended for compliance officers at Protection Seller and Broker-Advisor firms

COLLEGE OF THE DESERT

MATHEMATICAL OBJECTS in

Section 7.1: Functions Defined on General Sets

SUN SIGNS & PAST LIVES: YOUR SOUL'S EVOLUTIONARY PATH BY BERNIE ASHMAN

Instance Methods and Inheritance (1/2)

CS 170 Algorithms Spring 2009 David Wagner Final

Bloomsburg University Weather Viewer Quick Start Guide. Software Version 1.2 Date 4/7/2014

CSE 311: Foundations of Computing I. Lecture 1: Propositional Logic

Chapter 9: Roots and Irrational Numbers

Mathematics Foundation for College. Lesson Number 1. Lesson Number 1 Page 1

Lesson 11: Newton s Third Law: Quantitative

JOB REQUESTS C H A P T E R 3. Overview. Objectives

Transcription:

Information System Design IT60105 Lecture 6 Object-Oriented Design Paradigms

Concepts of objects Lecture #5 Object-Oriented Paradigms Class Encapsulation Relation between classes Association Aggregation Classifications Inheritance Delegation Polymorphism Dynamic Binding

Concepts of Objects

Fundamental Characteristics of Objects Object = State + Behavior + Identity State The group of values of all attributes at a given point of time e.g. Car Car modelno color engineno controlpanel speedometer distancetravelled fuelstatus Note: Some state attributes are constant Where as some are dynamically change e.g.distancetravelled, fuelstatus

Fundamental Characteristics of Objects Object = State + Behavior + Identity Behavior The group of all abilities of an object and describes the action and reaction among the objects C a r D r i v e r S t a t e s t a r t E n g i n e ( ) s t o p E n g i n e ( ) b r e a k ( ) f a s t ( ) s l o w ( ) S t a t e s t a r t ( ) a c c e l e r a t o r ( ) r e t a r d a t e ( ) s t o p ( ) Note: Behavior is the means of interface between two or more objects. E n g i n e S t a t e i g n i t e ( ) t u r b o C y c l e ( ) c y c l e O n ( ) c y c l e O f f ( )

Fundamental Characteristics of Objects Object = State + Behavior + Identity Identity The characterization of its existence. The identity makes it possible to distinguish an object in an unambiguous way and independently form its group e.g. Car carno Borrower borrowerno Person empid / voterid / rollno

Fundamental Characteristics of Objects Communication between two objects m e s s a g e A O b j e c t A O b j e c t B Type of objects Active objects Passive objects Transient/ephemeral objects Persistent objects m e s s a g e B Other objects categorization

Type of Objects Active objects An object is an active object if it is capable to send a message to another object Example: All clients are like active objects Passive objects An object that is not capable of sending a message to any other objects Example: All servers are like passive objects (however, they can reply to any message) Transient objects When an object constantly changes its state Example: Car is in motion Persistent objects Storing the state of objects to a permanent storage Stores attributes of an object into a permanent storage before leaving sessions

Other Type of Objects Entity objects Objects which are related to some entities Example: Customer, order, book, transaction etc. Controller Objects Objects which control the communication of several objects Example: Registration Controller, Scheduler, ATM System etc. Boundary objects These are the objects interfaced with the system or sub-system Example: Database wrapper, external system etc. Interface objects Act as an interface between a customer and system Example: Registration Screen, login screen etc.

Object-Oriented Paradigms

Aim of Object-Oriented Paradigms Real world is composed of very large number of interacting objects Objects are abstract things than the way computer process them Easy to understand Easy to manipulate Processed at higher level Paradigm based on the concept of object reduces the gap between our way of reasoning (by abstraction) and the concept understood by computers

Aim of Object-Oriented Paradigms O b j e c t s M o r e A b s t r a c t p r o g r a m s H i g h A b s t r a c t D F u n c t i o n s M n e m o n i c s B i n a r y C o d e a t a T y p e s Simplification L o w M o r e d i f f i c u l t p r o g r a m s

Aim of Object-Oriented Paradigms Challenges Real world objects are too complicated to manipulate Solution To reduce inherent complexity object oriented paradigm have been formulated

Object-Oriented Paradigms Encapsulation Relation Classification Polymorphism

O-O Paradigms: Encapsulation Encapsulations Combined data and methods to manipulate data into one entity Class is the concept of encapsulation A varieties of objects are grouped together such as book, car,..etc A set of similar objects grouped together with some distinguishing structure (at a high level of abstraction) Class is a process of abstraction

O-O Paradigms: Encapsulation Graphical representation of a class C l a s s n a m e A t t r i b u t e s o p e r a t i o n s Example: Car Car modelno color engineno controlpanel start() accelerate() retardate() Stop()

O-O Paradigms: Encapsulation Exercise: Give possible class structure to the following Set Complex number Rational number TV set Customer (of a Bank) Account (of a customer in a Bank) Stack/ Queue/Tree/Graph/Vector Note: Visibility of attributes and operations Public + Private - Protect #

O-O Paradigms: Relations Several classes may be interrelated with each other A relationship expresses a kind of interrelation between two classes Two types of relationships between any two classes Association Aggregation

Relation: Association The association relationship expresses a bi-directional, semantic connection between classes Bi-directional Data may flow across the association (This is unlike data flow in DFD) Semantic connection An association between classes means that there is a link between objects in the associated class If an association between two objects are there then one can navigate from an object to another object in the association

Example Relation: Association P e r s o n O f f e r e d b y c o u r s e

Association: Notation A n A s s o c i a t i o n C l a s s A C l a s s B E x a m p l e : U n i v e r s i t y E n r o l l s S t u d e n t

Association: Notation Association between two classes, in general, is called binary association It is also legal to have both ends of an association circle to back to the same class P C * e r s o n h i l d 1 F a t h e r

Association: Notation n-ary association is also possible An association having more than two classes also possible B a n k 1.. * C u s t o m e r 1.. * 1.. * A c c o u n t

Association: Notation More than one association may be mentioned between two classes U n i v e r s i t y E n r o l l s S t u d i e s i n S t u d e n t It is possible to specify the role of a class within an association W o r k s i n P e r s o n C o m a p n y E m p l o y e e E m p l o y e r

Association: Notation A class can play more than one role at a time Person Student faculty Register for Offered by course Role also carry multiplicity information that specifies the number of instances that participate in a relationship 1.. * W o r k s i n * P e r s o n C o m a p n y E m p l o y e e E m p l o y e r

Association: Notation Multiplicity Rules Symbol Meaning 1 One and only one 0..1 Zero or one M..N From M to N (natural integers) * From zero to any positive integers 0..* From zero to any positive integers 1..* From one to any positive integers

Example: Multiplicity Rule Customer may have more than one account An account may be jointly hold by more than one customer There are may be three types of accounts Saving (single customer only) Recurring (single or joint) Current (joint only, but allow at most 5 customers) Customer 1 1..* 2..5 saving recurring current * * * Account

Relation: Aggregation Aggregation allows the representation of whole/part relationship Whole-part relationship: one represents a large thing (the whole ), which consists of smaller things (the parts ) Example Engine is a part of Car Also, it expresses has a relationship Example University has a number of department

Aggregation: Notation Aggregate A Component B Meaning: B is being aggregated into A 1 h a s a U n i v e r s i t y * D e p a r t m e n t 1 W h o l e o f R e c t a n g l e * P o i n t

Aggregation: Notation Aggregation represents one-to-many as well as many-to-many relations E x a m p l e s o f O n e t o M a n y : 1 M a t r i x * N u m b e r 1 C o m p l e x N u m b e r 2 I n t e g e r E x a m p l e o f M a n y t o M a n y : P e r s o n c h i l d * p a r e n t 0.. 2

Association vs. Aggregation Association represents structural relationships between peers, meaning that both classes are at same level Class 1 follows * Course Aggregation represents a master and slave relationship between two classes Class 1 contains * Students

Association vs. Aggregation The following tests may be used to determine if a relation is an association or an aggregation Is the phase part describe the relationship? Rectangle 1 * Point University * Department

Association vs. Aggregation The following tests may be used to determine if a relation is an association or an aggregation Are some operations on the whole automatically applied to its parts? Class 1 contains * Student If delete a class then all of its student also deleted

Association vs. Aggregation The following tests may be used to determine if a relation is an association or an aggregation Is there any intrinsic asymmetry to the relationship where one classis subordinate to the other? Set 1 * Element

Association vs. Aggregation Truly, Aggregation is a special kind of Association Association: is-a relationship with weak coupling Aggregation: is-a relationship with strong coupling Association: bi-directional and symmetric connection between classes Aggregation: bi-directional and asymmetric connection between classes

Association vs. Aggregation A good heuristic test for whether a relationship is an aggregation is to ask If the part moves, can one deduce that the whole moves with it? People Is the MD Company Car 1 1 Engine

Composition Composition is a special case of aggregation Attributes are particular case of aggregation Attributes are physically contained in the aggregate Example: C y l i n d e r C a r E n g i n e T u r b u r a t o r A g g r e g a t i o n C o m p o s i t i o n

O-O Paradigms: Classification Class hierarchies (or classification) makes it possible to manage complexity by ordering the objects within trees or classes, with increase level of abstraction Generalization and specialization are the two point of views that are based on class hierarchy Generalization Sub class Super class More Generalized class More Specialized class Specialization

Classification: Generalization Generalization consists of factoring common elements (attributes, operations) within the set of classes into more general class called super class A new class (sub class) can be derived from the super class with some additional features in addition to the features in the super class Super class is an abstraction of its sub classes. Alternately, sub class is a detailed version than that of super class

Generalization: An Example General Abstraction Vehicle More General Abstraction Land Vehicle Water Vehicle Air Vehicle Car Truck Ship Stemmer Helicopter Plane Extension by Specialization

Classification: Specialization Specialization allows the capture of the specific features of a set of objects that have not been distinguished by the classes already identified The characteristics are represented by a new class, which is a subclass of the one of the existing classes Generalization Sub class Super class More Generalized class More Specialized class Specialization

Classification with Relations Examples: Classification with Association Butterfly appearance Stage Larva Caterpillar Adult Person appearance Stage Child Young Adult

Classification with Relations Example: Classification with Aggregation IEEE Member 1 implements 1 Member Type Student Member Professional member Life Member

Inheritance & Delegation Inheritance is the way to implement classification Single inheritance Multiple inheritance Delegation is the ability of an object to issue a message to another objects in response to a message Delegation is an alternative to inheritance Single inheritance Student Person Research Scholar Employee Multiple Inheritance

Inheritance: An Example Person name idno dob getinfo() printinfo() Maybe a super class Student branch program grade biodata rollno getregn() courseregn() Faculty designation doj dopromotion empcode biodata qualification specialization noofresearchers noofprojects updaterecord() Staff designation doj dopromotion empcode biodata updaterecord() getloan() getpayslip() touradv() payadv()

Polymorphism Poly = many Morphism = form An object (as well as attributes and operations) may be viewed with many forms Example : Real world Water has two forms: solid (ice) and liquid (water) Algebra z = z 1 + z 2 * z 3 + a * 5 z 4

Polymorphism: An Example IEEE Member...... Student.Profile() Professional...Profile().. Special.Profile() IEEE Executive....Profile()

Binding Binding closely related to Polymorphism Static binding (early binding) Resolve during compile time Dynamic binding (late binding) Resolve during run time

Static Binding In the case of static binding, the scope is required to be specified explicitly In C++, Java scope resolution operator(::) is used Example: B1 name display(<<name>>) D regnno display() B2 name display(<<name>>) display(){ print regnno B1::display() print B2::name }

Dynamic Binding It resolve during run time Example In d1.display ( ): name from d1, regnno from B In d2.display ( ): name from D1, regnno from D2 Note: here d1, d2 are object of D1, D2 classes respectively B1 name regnno display(){ print (name) print (regnno) } D1 name display() D2 regnno enroll()

Problem to Ponder a B D 1 a o f B D 2 a o f B C a o f B b y D 1? a o f B b y D 1? A m b i g u o u s U n a m b i g u o u s