Principles and techniques for system modelling which: Ð aim to produce a model of a system Ð provide notations and methods Advantages for software

Similar documents
P a g e 5 1 of R e p o r t P B 4 / 0 9

A L A BA M A L A W R E V IE W

Software Process Models there are many process model s in th e li t e ra t u re, s om e a r e prescriptions and some are descriptions you need to mode

176 5 t h Fl oo r. 337 P o ly me r Ma te ri al s

T h e C S E T I P r o j e c t

Use precise language and domain-specific vocabulary to inform about or explain the topic. CCSS.ELA-LITERACY.WHST D

Executive Committee and Officers ( )

H STO RY OF TH E SA NT

P a g e 3 6 of R e p o r t P B 4 / 0 9

Lesson Ten. What role does energy play in chemical reactions? Grade 8. Science. 90 minutes ENGLISH LANGUAGE ARTS

Use precise language and domain-specific vocabulary to inform about or explain the topic. CCSS.ELA-LITERACY.WHST D

Table of C on t en t s Global Campus 21 in N umbe r s R e g ional Capac it y D e v e lopme nt in E-L e ar ning Structure a n d C o m p o n en ts R ea

Me n d e l s P e a s Exer c i se 1 - Par t 1

OH BOY! Story. N a r r a t iv e a n d o bj e c t s th ea t e r Fo r a l l a g e s, fr o m th e a ge of 9

c. What is the average rate of change of f on the interval [, ]? Answer: d. What is a local minimum value of f? Answer: 5 e. On what interval(s) is f

Beechwood Music Department Staff

I M P O R T A N T S A F E T Y I N S T R U C T I O N S W h e n u s i n g t h i s e l e c t r o n i c d e v i c e, b a s i c p r e c a u t i o n s s h o

Dangote Flour Mills Plc

2 tel

F l a s h-b a s e d S S D s i n E n t e r p r i s e F l a s h-b a s e d S S D s ( S o-s ltiad t e D r i v e s ) a r e b e c o m i n g a n a t t r a c

Get Started on CreateSpace

Le classeur à tampons

IMPACT OF CLIMATE CHANGE ON AGRICULTURAL PRODUCTIVITY AND FOOD SECURITY Khalid Abdul Rahim. A World Leader in New Tropical Agriculture

THIS PAGE DECLASSIFIED IAW E

Agenda Rationale for ETG S eek ing I d eas ETG fram ew ork and res u lts 2

Instruction Sheet COOL SERIES DUCT COOL LISTED H NK O. PR D C FE - Re ove r fro e c sed rea. I Page 1 Rev A

C o r p o r a t e l i f e i n A n c i e n t I n d i a e x p r e s s e d i t s e l f

Information System Desig

RAHAMA I NTEGRATED FARMS LI MI TED RC

Class Diagrams. CSC 440/540: Software Engineering Slide #1

AT LAST!! CAGE CODE 6CVS2. SandMaster 20 for Skid Steers THE FUTURE OF EMERGENCY FLOOD CONTROL HAS ARRIVED.

I N A C O M P L E X W O R L D

Th e E u r o p e a n M ig r a t io n N e t w o r k ( E M N )

EKOLOGIE EN SYSTEMATIEK. T h is p a p e r n o t to be c i t e d w ith o u t p r i o r r e f e r e n c e to th e a u th o r. PRIMARY PRODUCTIVITY.

CATAVASII LA NAȘTEREA DOMNULUI DUMNEZEU ȘI MÂNTUITORULUI NOSTRU, IISUS HRISTOS. CÂNTAREA I-A. Ήχος Πα. to os se e e na aș te e e slă ă ă vi i i i i

STANDARDIZATION OF BLENDED NECTAR USING BANANA PSEUDOSTEM SAP AND MANGO PULP SANTOSH VIJAYBHAI PATEL

Ash Wednesday. First Introit thing. * Dómi- nos. di- di- nos, tú- ré- spi- Ps. ne. Dó- mi- Sál- vum. intra-vé-runt. Gló- ri-

Welcome to the Public Meeting Red Bluff Road from Kirby Boulevard to State Highway 146 Harris County, Texas CSJ No.: December 15, 2016

I n t e r n a t i o n a l E l e c t r o n i c J o u r n a l o f E l e m e n t a r y E.7 d u, c ai ts is ou n e, 1 V3 1o-2 l6, I n t h i s a r t

The distribution of characters, bi- and trigrams in the Uppsala 70 million words Swedish newspaper corpus

ROAD INVENTORY FOR CERTIFICATION OF MILEAGE

COMPILATION OF AUTOMATA FROM MORPHOLOGICAL TWO-LEVEL RULES

Information System Design IT60105

o Alphabet Recitation

Canadian Graduate and Professional Student Survey (CGPSS) 2016

Courtenay Lawn Bowling Club Spring General Meeting Sunday, April 9th, 2017 Florence Filberg Centre Lower Level Meeting Room

THIS PAGE DECLASSIFIED IAW EO 12958

Scope & Sequence Subject/Grade: Social Studies/ First Grade

EXAMPLE E. NCTM Standards

heliozoan Zoo flagellated holotrichs peritrichs hypotrichs Euplots, Aspidisca Amoeba Thecamoeba Pleuromonas Bodo, Monosiga

Department of computer engineering

S U E K E AY S S H A R O N T IM B E R W IN D M A R T Z -PA U L L IN. Carlisle Franklin Springboro. Clearcreek TWP. Middletown. Turtlecreek TWP.

FIS' Partnership with Zelle for P2P Payments

CMSC 313 Lecture 17 Postulates & Theorems of Boolean Algebra Semiconductors CMOS Logic Gates

F O U N D E D I N

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

Grain Reserves, Volatility and the WTO

Alles Taylor & Duke, LLC Bob Wright, PE RECORD DRAWINGS. CPOW Mini-Ed Conf er ence Mar ch 27, 2015

Ranking accounting, banking and finance journals: A note

THIS PAGE DECLASSIFIED IAW EO IRIS u blic Record. Key I fo mation. Ma n: AIR MATERIEL COMM ND. Adm ni trative Mar ings.

Solutions and Ions. Pure Substances

M Line Card Redundancy with Y-Cab l es Seamless Line Card Failover Solu t ion f or Line Card H ardw or Sof t w are Failu res are Leverages hardware Y-

M M 3. F orc e th e insid e netw ork or p rivate netw ork traffic th rough th e G RE tunnel using i p r ou t e c ommand, fol l ow ed b y th e internal

CHEM 10113, Quiz 5 October 26, 2011

SAMPLE AUDIT FORMAT. Pre Audit Notification Letter Draft. Dear Registrant:

EXPENDITURE SAMPLES AND FUNDS REQUEST FORM

STREET Light 120W/130W/140W/150W/185W. Provides high quality lighting and a long lifespan solution for residential,industrial areas and main roads.

Using the Rational Root Theorem to Find Real and Imaginary Roots Real roots can be one of two types: ra...-\; 0 or - l (- - ONLl --

Element Cube Project (x2)

NAME: FIRST EXAMINATION

Product Data Sheet KyoRack 2

STEEL PIPE NIPPLE BLACK AND GALVANIZED

C O M PA N Y P R O F I L E

Addendum-1, West Aurora 129 Print RFP

The Periodic Table. Periodic Properties. Can you explain this graph? Valence Electrons. Valence Electrons. Paramagnetism

Circle the letters only. NO ANSWERS in the Columns!

Last 4 Digits of USC ID:

SPU TTERIN G F R O M A LIQ U ID -PH A SE G A -IN EUTECTIC ALLOY KEVIN M A R K H U B B A R D YALE UNIVER SITY M A Y

Information System Decomposition Quality

Software Architecture. CSC 440: Software Engineering Slide #1

Form and content. Iowa Research Online. University of Iowa. Ann A Rahim Khan University of Iowa. Theses and Dissertations

The Ability C ongress held at the Shoreham Hotel Decem ber 29 to 31, was a reco rd breaker for winter C ongresses.

FOR SALE T H S T E., P R I N C E AL BER T SK

Guide to the Extended Step-Pyramid Periodic Table

SEXTANT & SEXTANT PE frequently asked questions

Certificate Sound reduction of building elements

PHYSICAL SCIENCES MARCH CONTROLLED TEST GRADE

FY ANNUAL FINANCIAL REPORT

PROOF/ÉPREUVE ISO INTERNATIONAL STANDARD. Space environment (natural and artificial) Galactic cosmic ray model

F48T10VHO, F60T10VHO, F72T10VHO, F96T12HO (1 LAMP ONLY) ELECTRICAL DATA (120V APPLICATION)

e2- THE FRANKLIN INSTITUTE We" D4rL E; 77.e //SY" Laboratories for Research and Development ceizrrra L , Ps" /.7.5-evr ge)/+.

Lab Day and Time: Instructions. 1. Do not open the exam until you are told to start.

Kenosha Unified School District Proposed Budget Detail Public Hearing Held September 13, 2018

Results as of 30 September 2018

The Transportation Problem

APPH 4200 Physics of Fluids

Foreword by Yvo de Boer Prefa ce a n d a c k n owledge m e n ts List of abbreviations

Review for the Algebra EOC

S U M O Shut Up Move On The Straight Talking Guide To Succeeding In Life

Example: 1. In this chapter we will discuss the transportation and assignment problems which are two special kinds of linear programming.

Transcription:

Unit 4 : Object -Oriented Analysis - Principles O b j ec t i ves To introduce the basic principles of object -orientation : objects; classes of object; encapsulation; inheritance; and p o ly m o rp h i sm. WhatÕs object - orientation all about? Principles and techniques for system modelling which: Ð aim to produce a model of a system Ð provide notations and methods Advantages for software development: Ð reduces the Ôsemantic gapõ between reality and models Ð makes system understanding easier Ð allows local modification to models 4Ñ1

An Object An obje c t is: Ð " An abstraction of something in a problem domain, reflecting the capabilities of a system to keep information a b ou t it, in t e ra c t w i t h i t, o r b o t hó ( C o ad & Y ou r do n 1 9 91) Ð "An entity able to save a state (information) and which offers a number of operations (behaviour ) to either examine or affect this state " ( Jacobson 1992) Objects and Abstraction "An abstracti o n d e n ot e s t h e e s s e nt i a l c h ar a ct e r i s ti c s o f a n object that distinguish it from all other kinds of objects and thus provide crisply defied conceptual boundaries, relative to the perspective of the viewer " (Booch 1994) 4Ñ2

Sample of Objects from a ÒFood Manufacturing C o mpanyó Passive objects Ðone i n d iv i du a l s a c k o f l e n ti l s Ðone packet of herbal t ea Ðinvoice 63501 sent to A Farm, Lincolnshire Active objects Ðlorry "M235 BCM" Ðvan "N683 CNM" Ðfax machi n e i n R i ch a r d G r e en 's offi c e ÒFood Manufacturing CompanyÓ ( continued) Human agents ÐRichard Green ÐDavid Brown (Executive) ÐHill, D (Truck driver) Structure obj ec t s ÐMarketing Department 4Ñ3

and Associations Any obje c t h a s b o t h a t tr i b u te s a n d a s s oc i at i o ns A t t ri b u tes Ðcharacteristic features or properties Ðname / valu e pa i rs A s s oc i at i o n Ðany ki n d o f l i n k o r c o nn e c ti o n Ðbetween one obje c t a n d o n e o r a s e t of o t h er o b je c t s Characteristics private to an object are best represented as a t t ri b u tes Associations are hips Two essenti a l o p p os i t io n s : a g gr e g at i on vs r e f er e n ce r e l at i on s h i ps Ð aggregation relationships, where connection creates composite objects from simple objects Ð reference relationships where connection only refers to another object static vs dynamic relationships Ð static relationships, where coupling of objects is stored over a lo n g p e r io d o f t i m e, Ð dynamic relationships, which are established by operations 4Ñ4

Viewpoint of Association View and purpose affect definition of association Partition or division ÐAssociation indicating new objects created by s p l it t i n g o t h er ob j e c ts ap a r t, e.g. A b oo k Ôconsi s t s o f Õ or Ôcan be divided intoõ : title page, introduction, chapters, conclusion, i n de x Aggregation or amalgamation ÐAssociation indicating new objects created by adding other objects together e.g Covers, binding, end papers, printed p a ge s ar e Ôj o in e d i n Õ a book Structure and Behaviour of Object Gordon, Junior Librarian, as object M T W T F Name: Gordon Position: Junior Librarian Age: 25 Salary: 12,000... Loan out books Rename position Amend salary Supervisor Timetable Equipment 4Ñ5

Behaviour and Structure in a Food Manufacturing Company One packet of herbal tea Price: 2.95 Weight: 1kg... Order: 57891 Delivery: 57891A Supplier: A Farm Is Stored Is Sold Is Delivered Richard Green Age: 45 Sex: Male Managing Director Decide policies Attend meetings Manage Board meetings Lorry M235 BCN Reg: M235 BCN Weight: 7.5 tons Fuel level: 40 litres Driver Hill, D Trailer SSFG12 Deliveries Goods Repeat Until End Go To Destination Unload Goods EndRepeat Refuel... Marketing Department Staff: 50 people Location: High St Marketing Director Marketing Team Market All Products Choose New Products Determine Market Niches Object Identity Separate obj e ct s e ac h ha v e a un i qu e ob j e ct id e n ti t y Name: Gordon Position: Junior Librarian Age: 25 Salary: 12,000 Loan out books Rename position Amend salary... Name: Gordon Position: Junior Librarian Age: 25 Salary: 12,000... Loan out books Rename position Amend salary Supervisor Timetable Supervisor Equipment Timetable Equipment 4Ñ6

Dynamics of Objects Dynamics are generated through stimuli or messages passing between objects Receipt of a stimulus cause operation by (or in) the receiving o b j ec t Receipt of a stimulus can trigger sending of another stimulus to other objects 2 3 1 4 E n c a ps u l a tion ÒBehaviour and information are encapsulated in objectsó ( Jacobson 1992) ÒEncapsulation is the process of compartmentalising the elements of an abstraction that constitute its structure and behaviouró (Booch 1995) Only the 'interface' of an object is 'visible' to other objects Need, an d c an, on l y k n o w o p e ra t i on s o n a n o b j ec t, n o t h o w t h e y work nor about other characteristics Necessary prerequi s it e f o r i n fo r m at i on hi d i ng 4Ñ7

Encapsulation ( continued) Name Position Salary Age Loan out books Rename position Amend salary Encapsulation and abstraction are complementary concepts Abstraction focuses on the observable characteristics and behaviour of the object Encapsulation focuses on the representation derived from these characteristics Encapsulation requires : Ð explicit division between abstractions Ð clear separation of their concerns Classes of Object "abstracted from" Classes Classes represent groups of objects which have the same behaviour and information structures. Cl as s i s a k in d o f t y p e, an AD T ( bu t w i t h d a ta ), o r a n 'enti t y' (but with methods) Cl as s e s ar e th e s am e in b ot h a n al y s is a nd d e s ig n ÒA cl as s r ep r e s en t s a te m p l at e f o r s e v e ra l o b j ec t s... Ob j e ct s o f t h e s a m e c l as s h av e th e sa m e d e fi n it i o n b o t h f o r t h e ir operations and for their information structureó ( J ac o b so n 1 9 9 2) Common features 4Ñ8

Sample Classes from a ÒFood Manufacturing C o mpanyó Product Price Weight... Order Delivery Supplier Is Created Is Sold Is Delivered Employee Age Weight Sex Role Joins Company Leaves Company Reviewed Promoted Demoted Truck Department Registration No. Weight Fuel Driver Trailer Deliveries Goods Repeat Until End Go To Destination Unload Goods EndRepeat Refuel... Personnel Number Location... Director Marketing Team... Hire new staff Dismiss new staff Objects - Instances of Classes E v e ry ob j e ct is a n i n s ta n c e o f a s i n gl e cl a s s ÐA cl as s d e fi n e s t h e p o s s ib l e b e h av i ours an d t h e i n fo r m at i o n structure of all its object instances. Different instances may have their operations activated in different ways and in different sequences ; hence they may be in different states. Reg: M235 BCN Weight: 7.5 tons Fuel level: 40 litres Driver: Hill, D Trailer: SSFG12 Truck M235 BCN Deliveries Goods Repeat Until End Go To Destination Unload Goods EndRepeat Refuel... 4Ñ9

Instantiation of Objects Instantiation of a class generates an object, an instance of its c l ass Instantiation demands a specific create operation in every c l ass Truck Registration No. Weight Fuel Driver Trailor Create (Truck) Deliveries Goods Refuel Delete (Truck) I n h er itanc e Inheritence is a relationship between different classes which share common characteristics. Ò I f c l as s B i n h er i t s c l as s A, t he n bo t h t h e o p e ra t i on s an d information structure in class A will become part of class BÓ (Jacobsen 1992) Major benefits are simpler, clearer classes, at higher levels of a b s tr a c ti o n Employee Managing Director "is an" "inherits from" Truck Driver 4Ñ10

Generalisation & Specialisation G e n er a l is a t io n ÐCreation of an 'ancestor' Speci a li s at i o n ÐCreation of a 'descendant' Managing Director Warehouse Admin Employee "is an" "inherits from" Clerical Worker "is a" "inherits from" Office Admin Truck Driver Multiple Inheritance 1 class inherits from 2 or more existing classes ÐAllows more complex class structures, but less easily u n de r s t oo d librarian long-term staff short-term staff counter staff repair staff circulation staff other staff 4Ñ11

Ambiguities through Multiple Inheritance Name Clashes Incorrect repeated inheritance : A (..A..) (..A..) (..A..)?? Pol y morphis m System behavi o ur is d ef i ne d b y th e d y na m i c b e h av i ou r o f instances of classes ÒPolymorphism means that the sender of a stimulus does not need to know the receiving instance's class. The receiving instance can belong to an arbitary classó (Jacobsen 1992) Polymorphism enables different instances of different classes to be associated A receiv i n g i n s ta n ce i nt e r pr e t s s t i m ul i a c c or d in g t o i t s o w n c l ass 4Ñ12

Key Points Basic Concepts Ð object : entity combining essential characteristics abstracted from a system domain Ð class : expression of common characteristics of objects Ð encapsulation : combination of attributes and operations in a single self- contained object Ð inheritance : relationship between superclass and subclass defining levels of commonality Ð polymorphism : facility allowing stimuli to ignore class of receiving o b je c t Application of concepts enables: object identification, object modelling and behaviour modelling 4Ñ13