An Introduction to Object-Oriented AnalysisObjects and UML .ppt
《An Introduction to Object-Oriented AnalysisObjects and UML .ppt》由会员分享,可在线阅读,更多相关《An Introduction to Object-Oriented AnalysisObjects and UML .ppt(125页珍藏版)》请在麦多课文档分享上搜索。
1、An Introduction to Object-Oriented Analysis Objects and UML in plain English. Chapter 5: Objects and Classes,Based on the book by David William Brown,John Wiley & Sons, ISBN 0471371378,Copyright,Copyright 8 2002 Flying Kiwi Productions All rights reserved.This slide presentation is based on “An Intr
2、oduction to Object-Oriented Analysis; Objects and UML in Plain English,” by David William Brown, Wiley, ISBN 0471371378, “The Book.” Permission is hereby granted to copy, modify or excerpt all or any part of this slide presentation, provided it is solely for use with courses, seminars or other prese
3、ntations or productions where a copy of The Book is purchased by or for each and every participant or recipient.An instructor guide is available free from the publisher for use with such presentations.,Chapter 5: Objects and Classes,5.1. Real-World vs Data-World Objects 5.2. Classes and Classificati
4、on 5.3. Transient and Persistent Objects 5.4. Objects: Classes or Instances? 5.5. Associations 5.6. Anthropomorphism,5.1. Real-World vs Data-World Objects Here is what its all about:,We Analysts must understand and document the real world where our users live. We then create a product in the compute
5、r world, To help the users do their job in the real world. Effective analysts must ensure the computer-world product accurately mirrors the users real-world needs.,This is why our jobs exist!,5.1. Real-World vs Data-World Objects,5.1. Real-World vs Data-World Objects,What An Object Is In the Real Wo
6、rld In the Data World Jacobsons Three Types Entity Objects Concrete objects Conceptual objects Event and State objects Interface Objects Control Objects,Attributes Behavior Identity Encapsulation Violating Encapsulation Object States,Now lets look at these in detail. . .,Dictionaries: A thing Can be
7、 seen, touched or otherwise sensed Someone is aware of it A material thing A thing in a picture In other words, an object is a THING.,5.1. Real-World vs Data-World Objects What An Object Is:,“The world is full of things.” From the millions, we choose the ones relevant to our project. We must work cl
8、osely with the users Involve them at every step To ensure we have the objects they need. We look for subclasses among the objects.,5.1. Real-World vs Data-World Objects In the Real World:,Remember, an Object is an Entity with Behavior.,5.1. Real-World vs Data-World Objects In the Real World:,The Wor
9、ld is full of THINGS,THINGS,An object is some Thing in the world of the user Car, Train, Elephant, Sale, Invoice, Division, Account, etc. Physical or Conceptual It has Attributes that describe it: Make, Model, Year, Color, Weight, Serial Number, License Number It has Relationships to other objects:
10、e.g., to a Person object, i.e., the Owner.It has Behavior that it can do: Create Change Color Change Owner Destroy Itself (Suicide?),Entity,Object,in the DATA WORLD,We have some kind of record in the computer for each real-world object It carries data for the attributes Make, Model, Year, Color, Wei
11、ght, Serial Number, License Number The set of attribute values represents the STATE of the object It carries a link of some kind for each relationship Foreign Key or pointerIt carries program code for each behavior Create, Change Owner, Change Color, Delete Itself (Suicide?) CRUD: Create, Read (Gimm
12、e .), Update, Delete.,Entity,Object,Mostly, a Data-World Object is a Representation of a Real-World Object. And since it carries only The data we need for the job at hand, and The behavior (program code) for the job at hand This makes it an abstraction of the real-world object.,5.1. Real-World vs Da
13、ta-World Objects In the Data World:,A Data Object is an abstraction of some thing in the real world, that carries both the data describing the real-world object , and the operations (i.e., program code) that have the only allowable access to that data.,5.1. Real-World vs Data-World Objects We Define
14、:,In an OOPL, an object is created as a piece of RAM Organized into fields (data elements) for the attributes. This is just like the “struct” in C or the “Record” in Pascal. Whats different in objects is that theprogram code is part of the object. It is made available as soon as the object is create
15、d.,5.1. Real-World vs Data-World Objects,Some OOPLs and OODBMSs actually have the compiled code for the methods right there on the disk or in the database. At run time it is executed directly from the disc or database. This is “Late Binding” or “Dynamic Binding.” “Early Binding” or “Static Binding”
16、has the methods stored in semi-compiled form, and they are compiled or linked into the program at compile time.These are discussed in detail in Chapters 8 and 14.,5.1. Real-World vs Data-World Objects,5.1. Real-World vs Data-World Objects Jacobsons Three Types,Entity Objects Interface Objects Contro
17、l Objects,5.1. Real-World vs Data-World Objects Jacobsons Three Types In the interests of stability and resilience to change, Jacobson (pron. Yahcobson) classifies objects into three types:,Lets look at these in detail. . .,5.1. Real-World vs Data-World Objects Jacobsons Three Types,Entity Objects T
18、hese are the ones we have already been discussing. They represent objects in the users real world. All relevant behavior associated with the corresponding real-world object is modeled by the methods.,5.1. Real-World vs Data-World Objects Jacobsons Three Types,Definition:Entity Objects are the fundam
19、ental objects and classes that we discover in Analysis by scanning the users business.,5.1. Real-World vs Data-World Objects Jacobsons Three Types There are three kinds of Entity Objects:,Concrete objects Conceptual objects Event and State objects. . .,5.1. Real-World vs Data-World Objects Jacobsons
20、 Three Types .Concrete Objects:,Solid, tangible and physical. Things you can grab hold of. People, animals and other beings Land, buildings, equipment, vehicles Goods, products, tools, appliances, materialsThese are easily understood by both analysts and users.,5.1. Real-World vs Data-World Objects
21、Concrete Entity Objects,Person Apartment Elevator Food Employee Warehouse Forklift Product Customer House Car Clothes Student College Cell phone Pen Citizen Street Truck Gravel Engineer Office Lathe Steel Animal Farm Tractor Beer Doctor Hospital Scalpel Blood Librarian Library Computer Book Cop Stat
22、ion Gun Bullets,Beings,Land & Buildings,Equipment,Goods,5.1. Real-World vs Data-World Objects Jacobsons Three Types . Conceptual Objects:,Intangible, nonphysical More difficult for users to grasp, But they are still things and objects Typically defined in terms of other object classes . . .e.g., by
23、breaking out a M:M relationship See Chapter 9.,Corporation Strategy Lease Church Plan Mortgage Regiment Map Ceasefire Sports club Schedule Membership Government dept Proposal Approval Professional assn Qualification Charter Union Bylaws Contract,5.1. Real-World vs Data-World Objects Conceptual Entit
24、y Objects,Organizations,Abstractions,Agreements,These are conceptual in the sense that a contract does not consist of a piece of paper. Rather, it is an agreement that comes into existence, The moment the two parties agree, verbally or otherwise. Signing the piece of paper documents the existence of
- 1.请仔细阅读文档,确保文档完整性,对于不预览、不比对内容而直接下载带来的问题本站不予受理。
- 2.下载的文档,不会出现我们的网址水印。
- 3、该文档所得收入(下载+内容+预览)归上传者、原创作者;如果您是本文档原作者,请点此认领!既往收益都归您。
下载文档到电脑,查找使用更方便
2000 积分 0人已下载
下载 | 加入VIP,交流精品资源 |
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- ANINTRODUCTIONTOOBJECTORIENTEDANALYSISOBJECTSANDUMLPPT

链接地址:http://www.mydoc123.com/p-378299.html