《面向对象软件工程》课程PPT教学课件(英文版)Chapter 6:Using Design Patterns

object-Oriented Software Engineering Practical Software development using uml and Java Chapter 6: sing Design Patterns www.oseng.com
Object-Oriented Software Engineering Practical Software Development using UML and Java Chapter 6: Using Design Patterns

6.1 Introduction to patterns The recurring aspects of designs are called designpatterns. a pattern is the outline of a reusable solution to a general problem encountered in a particular context Many of them have been systematically documented for all software developers to use A good pattern should be as general as possible -Contain a solution that has been proven to effectively solve the problem in the indicated context Studying patterns is an effective way to learn from the experience of others www.oseng.com O Lethbridge/Laganiere 2001 Chapter 6: Using design patterns
© Lethbridge/Laganière 2001 Chapter 6: Using design patterns 2 6.1 Introduction to Patterns The recurring aspects of designs are called design patterns. • A pattern is the outline of a reusable solution to a general problem encountered in a particular context • Many of them have been systematically documented for all software developersto use • A good pattern should —Be as general as possible —Contain a solution that has been proven to effectively solve the problemin the indicated context. Studying patterns is an effective way to learn from the experience of others

Pattern description Context: The general situation in which the pattern applies Proble a short sentence or two raising the main difficulty Forces The issues or concerns to consider when solving the problem Solution The recommended way to solve the problem in the given context ‘ to balance the forces Antipatterns: (Optional) Solutions that are inferior or do not work in this context Related patterns: (Optional) Patterns that are similar to this pattern References Who developed or inspired the pattern www.oseng.com O Lethbridge/Laganiere 2001 Chapter 6: Using design patterns
© Lethbridge/Laganière 2001 Chapter 6: Using design patterns 3 Pattern description Context: • The general situation in which the pattern applies Problem: —A shortsentence or two raising the main difficulty. Forces: • The issues or concernsto consider when solving the problem Solution: • The recommended way to solve the problemin the given context. —‘to balance the forces’ Antipatterns:(Optional) • Solutionsthat are inferior or do not work in this context. Related patterns: (Optional) • Patternsthat are similar to this pattern. References: • Who developed or inspired the pattern

6.2 The Abstraction-Occurrence pattern · Context -Often in a domain model you find a set of related objects occurrences -The members of such a set share common information but also differ from each other in important ways · Problen what is the best way to represent such sets of occurrences in a class diagram · Forces You want to represent the members of each set of occurrences without duplicating the common information www.oseng.com O Lethbridge/Laganiere 2001 Chapter 6: Using design patterns 4
© Lethbridge/Laganière 2001 Chapter 6: Using design patterns 4 6.2 The Abstraction-Occurrence Pattern • Context: —Often in a domain model you find a set of related objects (occurrences). —The members of such a set share common information - but also differ from each other in important ways. • Problem: —What is the best way to represent such sets of occurrences in a class diagram? • Forces: —You want to represent the members of each set of occurrences without duplicating the common information

Abstraction-Occurrence Solution Abstraction》 Occurrence》 TVSeries Episode series Name number producer title story Synopsis Title Librarylter barCode Number author publicationDate libofCongress www.oseng.com O Lethbridge/Laganiere 2001 Chapter 6: Using design patterns
© Lethbridge/Laganière 2001 Chapter 6: Using design patterns 5 Abstraction-Occurrence • Solution: TVSeries seriesName producer Episode number title storySynopsis * «Abstraction» «Occurrence» * Title name author LibraryItem barCodeNumber * isbn publicationDate libOfCongress

Abstraction-Occurrence Antipatterns: Libraryltem Librarvitem Title name na me name u tho auton au thol is bn publicati on Date oublicati on date publicati on Date libOfCongress li boc ongress li boiC ongress barco renumber barcodenumber Libraryltem GulliversTravels Moby Dick bar codenumber www.oseng.com O Lethbridge/Laganiere 2001 Chapter 6: Using design patterns 6
© Lethbridge/Laganière 2001 Chapter 6: Using design patterns 6 Abstraction-Occurrence Antipatterns: name author LibraryItem ba rCodeNumber is bn publicationDate libOfCongre ss Title name author LibraryItem ba rCodeNumber is bn publicationDate libOfCongre ss name author LibraryItem ba rCodeNumber is bn publicationDate libOfCongre ss GulliversTravels MobyDick

Abstraction-Occurrence Square variant Scheduledtrain SpecificTrain number date ScheduledLeg SpecificLeg scheduled DepTime actualDepTime scheduledarr time actualArr Time origIn destination Station www.oseng.com O Lethbridge/Laganiere 2001 Chapter 6: Using design patterns
© Lethbridge/Laganière 2001 Chapter 6: Using design patterns 7 Abstraction-Occurrence Square variant ScheduledTrain number SpecificTrain date * * * ScheduledLeg SpecificLeg actualDepTime * actualArrTime scheduledDepTime scheduledArrTime Station origin destination * *

6.3 The general hierarchy pattern · Context -Objects in a hierarchy can have one or more objects above them superiors and one or more objects below them(subordinates) Some objects cannot have any subordinates · Problen objects cannot have subordinates y of objects, in which some How do you represent a hierarchy orces You want a flexible way of representing the hierarchy that prevents certain objects from having subordinates -all the objects have many common properties and operations www.oseng.com O Lethbridge/Laganiere 2001 Chapter 6: Using design patterns 8
© Lethbridge/Laganière 2001 Chapter 6: Using design patterns 8 6.3 The General Hierarchy Pattern • Context: —Objects in a hierarchy can have one or more objects above them (superiors), - and one or more objects below them (subordinates). —Some objects cannot have any subordinates • Problem: —How do you represent a hierarchy of objects, in which some objects cannot have subordinates? • Forces: —You want a flexible way of representing the hierarchy - that prevents certain objects from having subordinates —All the objects have many common properties and operations

General hierarchy Node》 · Solution: 《 subordinate》 Non SuperiorNode》 SuperiorNode》 Employee supervises File Systemltemk contains SecretaryTechnician/[ Manager File Directory www.oseng.com O Lethbridge/Laganiere 2001 Chapter 6: Using design patterns
© Lethbridge/Laganière 2001 Chapter 6: Using design patterns 9 General Hierarchy • Solution: «subordinate» * «Node» «NonSuperiorNode» «SuperiorNode» * supervises Manager Employee Secretary Technician 0..1 0..1 * contains Directory FileSystemItem File 0..1

General Hierarch Antipattern Recording VideoRecoding AudioRecording MusicVideo JazzRecording ClassicalRecording Blues Recording RockRecordingl www.oseng.com O Lethbridge/Laganiere 2001 Chapter 6: Using design patterns
© Lethbridge/Laganière 2001 Chapter 6: Using design patterns 10 General Hierarchy Antipattern: MusicVideo JazzRecording ClassicalRecording BluesRecording RockRecording VideoRecoding AudioRecording Recording
按次数下载不扣除下载券;
注册用户24小时内重复下载只扣除一次;
顺序:VIP每日次数-->可用次数-->下载券;
- 《面向对象软件工程》课程PPT教学课件(英文版)Chapter 5:Modelling with Classes.ppt
- 《面向对象软件工程》课程PPT教学课件(英文版)Chapter 4:Developing Requirements.ppt
- 《面向对象软件工程》课程PPT教学课件(英文版)Chapter 3:Basing Software Development on Reusable Technology.ppt
- 《面向对象软件工程》课程PPT教学课件(英文版)Chapter 2:Review of Object Orientation.ppt
- 《面向对象软件工程》课程PPT教学课件(英文版)Chapter 1:Software and Software Engineering.ppt
- 《面向对象软件工程》课程PPT教学课件(英文版)Chapter 7:Focusing on Users and Their Tasks.ppt
- 徐州工程学院:《电子商务概论》课程教学资源(PPT课件讲稿)总目录.ppt
- 徐州工程学院:《电子商务概论》课程教学资源(PPT课件讲稿)导论(主讲:武长柱).ppt
- 徐州工程学院:《电子商务概论》课程教学资源(PPT课件讲稿)复习.ppt
- 徐州工程学院:《电子商务概论》课程教学资源(PPT课件讲稿)chp14电子商务发展中的法律法规.ppt
- 徐州工程学院:《电子商务概论》课程教学资源(PPT课件讲稿)chp9 电子商务开发技术.ppt
- 徐州工程学院:《电子商务概论》课程教学资源(PPT课件讲稿)chp8 电子政务.ppt
- 徐州工程学院:《电子商务概论》课程教学资源(PPT课件讲稿)chp7 物流与供应链管理.ppt
- 徐州工程学院:《电子商务概论》课程教学资源(PPT课件讲稿)chp6 客户关系管理.ppt
- 徐州工程学院:《电子商务概论》课程教学资源(PPT课件讲稿)chp5 网络银行与支付.ppt
- 徐州工程学院:《电子商务概论》课程教学资源(PPT课件讲稿)chp4 网络营销与管理.ppt
- 徐州工程学院:《电子商务概论》课程教学资源(PPT课件讲稿)chp3 电子商业与贸易.ppt
- 徐州工程学院:《电子商务概论》课程教学资源(PPT课件讲稿)chp2 电子商务机理与模式.ppt
- 徐州工程学院:《电子商务概论》课程教学资源(PPT课件讲稿)chp15 电子商务发展状况.ppt
- 徐州工程学院:《电子商务概论》课程教学资源(PPT课件讲稿)chp12 电子商务网站建设.ppt
- 《面向对象软件工程》课程PPT教学课件(英文版)Chapter 1. Software and Software Engineering.pdf
- 《面向对象软件工程》课程PPT教学课件(英文版)Chapter 8:Modelling Interactions and Behaviour.ppt
- 《面向对象软件工程》课程PPT教学课件(英文版)Chapter 9:Architecting and Designing Softwarech09.ppt
- 《面向对象软件工程》课程PPT教学课件(英文版)Chapter 10:Testing and Inspecting to Ensure High Quality.ppt
- 《面向对象软件工程》课程PPT教学课件(英文版)Chapter 11:Managing the Software Process.ppt
- 《PPT应用与计算机安全》讲义.ppt
- 《新标准中文版Photoshop7基础培训教程》教学资源(PPT课件讲稿)第10章 滤镜(上).ppt
- 《新标准中文版Photoshop7基础培训教程》教学资源(PPT课件讲稿)第11章 滤镜(下).ppt
- 《新标准中文版Photoshop7基础培训教程》教学资源(PPT课件讲稿)第1章 初识Photoshop 7.ppt
- 《新标准中文版Photoshop7基础培训教程》教学资源(PPT课件讲稿)第2章 基础工具.ppt
- 《新标准中文版Photoshop7基础培训教程》教学资源(PPT课件讲稿)第3章 绘图工具.ppt
- 《新标准中文版Photoshop7基础培训教程》教学资源(PPT课件讲稿)第4章 油漆桶和渐变工具.ppt
- 《新标准中文版Photoshop7基础培训教程》教学资源(PPT课件讲稿)第5章 路径及形状处理工具.ppt
- 《新标准中文版Photoshop7基础培训教程》教学资源(PPT课件讲稿)第6章 文字工具.ppt
- 《新标准中文版Photoshop7基础培训教程》教学资源(PPT课件讲稿)第7章 其他工具.ppt
- 《新标准中文版Photoshop7基础培训教程》教学资源(PPT课件讲稿)第8章 图层与蒙版第8章.ppt
- 《新标准中文版Photoshop7基础培训教程》教学资源(PPT课件讲稿)第9章 通道的应用.ppt
- 《数字图象处理》第一章 Windows 位图和调色板.doc
- 《数字图象处理》第十章 图象处理编程工具及简单的多媒体编程.doc
- 《数字图象处理》第二章 图象的几何变换.doc