Object-Oriented Analysis and Design Methods.ppt
《Object-Oriented Analysis and Design Methods.ppt》由会员分享,可在线阅读,更多相关《Object-Oriented Analysis and Design Methods.ppt(48页珍藏版)》请在麦多课文档分享上搜索。
1、TCS2411 Software Engineering,1,Object-Oriented Analysis and Design Methods,“How to create and define objects?”,TCS2411 Software Engineering,2,Lecture Objectives,To understand the process of identifying and creating objects for a system To describe a method for developing objects for an object-orient
2、ed system To describe the representations that can be used for objects and their relationships To discuss the dynamic aspects of object-oriented systems and how to model them,TCS2411 Software Engineering,3,Too Many Methodologies!,Booch Object-Oriented Design Rumbaugh Object Modeling Technique Shlaer
3、 and Mellor Analysis and Design Jacobson Objectory Wirfs-Brock Responsibility Driven Design Martin and Odell Object-Oriented Analysis and Design Others,TCS2411 Software Engineering,4,Object-Oriented Analysis,Identify the objects and classes Identify the object attributes Identify operations on objec
4、ts and classes Define object and class relationships Model dynamic concepts,TCS2411 Software Engineering,5,Identify the objects and classes,Grammatical Analysis Nouns are objects and attributes Verbs are operations or services Tangible entities (things), roles, events, interactions, etc. in applicat
5、ion domain Use behavioural approach Participants in behaviours as objects Scenario-based analysis,TCS2411 Software Engineering,6,Identify the object attributes,Specify attributes (instance variables) of objects in problem domain These are to be recorded, displayed, stored, and/or manipulated in func
6、tions of the domain,TCS2411 Software Engineering,7,Identify operations on objects and classes,Operations that are used to interact with the objects and classes Each class has a protocol that captures the messages or operations that could be handled by the class or its instances Users or “clients” of
7、 classes and objects deal primarily with the external operations of the class,TCS2411 Software Engineering,8,Example Scenario,“The Office Information Retrieval System (OIRS) can file documents under some name in one or more indexes, retrieve documents, display and maintain document indexes, archive
8、documents and destroy documents. The system is activated by a request from the user and always returns a message to the user indicating the success or failure of the request.”,TCS2411 Software Engineering,9,Objects Identified,IndexNameDisplay Delete entry Add entry,UserGet command Put message,Docume
9、ntNameFileRetrieveArchiveDestroy,Retrieval SystemUser command,TCS2411 Software Engineering,10,Define object and class relationships,Capture relationship between classes. Typical relationships: Inheritance Organisation of classes or entity types in problem domain One-to-One, One-to-Many, Many-to-Many
10、 relationships that exist between objects that reference each other,TCS2411 Software Engineering,11,Example of Inheritance,Person,Student,Employee,MarketingPerson,SalesPerson,SalesManager,TCS2411 Software Engineering,12,Example of Other Relationships,Country,City,Person,Company,File,User,Has-capital
11、,Works-for,Accessible-by,One-to-One,One-to-Many,Many-to-Many,TCS2411 Software Engineering,13,Model dynamic concepts,State transition diagrams Specify states of the objects Specify events that trigger transitions Specify actions taken due to transitions Data flow diagrams Describe flow of objects and
12、 information Timing diagrams Illustrate object interactions over time,TCS2411 Software Engineering,14,State transition diagram,Blacks turn,Whites turn,Start,Black moves,White moves,checkmate,checkmate,stalemate,stalemate,Draw,White wins,Black wins,TCS2411 Software Engineering,15,Data flow diagram,Cu
13、stomer,Update,Verify,Account,password,amount,cash,Coded password,old balance,Password ok,new balance,TCS2411 Software Engineering,16,Timing diagrams,Caller,Phone line,Callee,Caller lifts receiver,Dial tone begins,Dials number,Ringing tone,Phone rings,Answers phone,Tone stops,Ringing stops,Phones con
14、nected,Phones connected,Callee hangs up,Connection broken,Connection broken,TCS2411 Software Engineering,17,Unified Modeling Language Approach OOA,User view model system represented from the users perspective by developing use-case model Structural view model data and function is view from inside th
15、e system, static structure (classes, objects, relationships) is modeled,TCS2411 Software Engineering,18,Use Case,Scenario based technique for requirement elicitation Use case should achieve the following objectives : Define functional and operational requirements of the system Provide clear descript
16、ion of how end user and the system will interact with one another Basis for validation testing,TCS2411 Software Engineering,19,Use Case Diagram Elements,Actor : Entities that interact with the system Person, machine, another system etc Represent roles that a user play in the system Use case Sequence
17、 of transaction performed by the system Initiated by an actor to invoke certain function in the system,TCS2411 Software Engineering,20,Use Case Diagram For The Library,TCS2411 Software Engineering,21,Identify Objects and Classes,Object Thing that can interact with Reacts when send messages concept,
18、abstraction or thing that has sharp boundaries and meaning for an application Object has State : value of property at a given time Behavior : objects action and reaction Identity : distinguishes from other objects,Class A sets of objects with an equivalent roles in the system Every object belongs to
19、 a class Example : Tangible : book, copy, course Roles : library member, student Events : arrival, leaving, request Interaction : meeting, intersection,TCS2411 Software Engineering,22,Identify Class Attributes & Operations,TCS2411 Software Engineering,23,Relationship,Why do we need Relationship All
20、system encompass many classes and objects Objects contribute to the behavior of a system by collaborating with one another Collaboration is accomplish through relationships Two important type of relationship during analysis Association Aggregation,TCS2411 Software Engineering,24,Association,Represen
21、t relationship between objects of classes Multiplicity Association Number of instance of one class related to one instance of the other class Multiplicity indicator Many - * Exactly one - 1 Zero or more - 0 * One or more - 1 * Zero or one - 0 1 Specified range - m n Eg :- 2 4,TCS2411 Software Engine
22、ering,25,Inheritance,Hierarchy abstraction where subclass inherits from one or more superclass Subclass inherits attributes, operations and relationships Subclass may have additional attributes, operations or relationship How to find inheritance? Look for common behavior and attributes in classes,TC
- 1.请仔细阅读文档,确保文档完整性,对于不预览、不比对内容而直接下载带来的问题本站不予受理。
- 2.下载的文档,不会出现我们的网址水印。
- 3、该文档所得收入(下载+内容+预览)归上传者、原创作者;如果您是本文档原作者,请点此认领!既往收益都归您。
下载文档到电脑,查找使用更方便
2000 积分 0人已下载
下载 | 加入VIP,交流精品资源 |
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- OBJECTORIENTEDANALYSISANDDESIGNMETHODSPPT
