2023年全國碩士研究生考試考研英語一試題真題(含答案詳解+作文范文)_第1頁
已閱讀1頁,還剩33頁未讀, 繼續(xù)免費閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認(rèn)領(lǐng)

文檔簡介

1、2024/3/18,1,面向?qū)ο蟮臏y試,7(續(xù)),2024/3/18,2,議題,面向?qū)ο蟮能浖卣髅嫦驅(qū)ο蟮念悳y試面向?qū)ο蟮募膳c系統(tǒng)測試,2024/3/18,3,面向?qū)ο蟮能浖卣?軟件缺陷可能不能修復(fù)沒有足夠的時間不算真正的軟件缺陷修復(fù)的風(fēng)險太大不值得修復(fù)審查軟件缺陷,判定是否可以修復(fù)判定依據(jù)是軟件測試的缺陷報告,2024/3/18,4,Object Orientation的原理,2024/3/18,5,Salesp

2、erson,Customer,Product,Manages Complexity,提取抽象Abstraction,2024/3/18,6,,,,,Improves Resiliency,封裝Encapsulation,Hide implementation from clientsClients depend on interface,2024/3/18,7,Order Processing System,Billing,Order

3、Entry,OrderFulfillment,,Manages Complexity,模塊化 Modularity?,The breaking up of something complex into manageable pieces,2024/3/18,8,Asset,Real Estate,Savings,Bank Account,Checking,Stock,Security,Bond,Elements at the sam

4、e level of the hierarchy should be at the same level of abstraction,,,,,,,,層次Hierarchy,Levels of abstraction,2024/3/18,9,Object Orientation中的概念,ObjectClassAttributeOperationInterface (Polymorphism)ComponentPackage

5、Relationships,2024/3/18,10,,Chemical Process,對象 Object,Informally, an object represents an entity, either physical, conceptual, or softwarePhysical entityConceptual entitySoftware entity,2024/3/18,11,,對象的正式定義,An

6、 object is a concept, abstraction, or thing with sharp boundaries and meaning for an application An object is something that has:StateBehaviorIdentity,2024/3/18,12,,: Professor,,a + b = 10,ProfessorClark : Professor

7、,,ProfessorClark,,Class Name Only,Object Name Only,Class and Object Name,(stay tuned for classes),對象表示,An object is represented as rectangles with underlined names,2024/3/18,13,,OO Principle: Abstraction,類Class,A class i

8、s a description of a group of objects with common properties (attributes), behavior (operations), relationships, and semanticsAn object is an instance of a classA class is an abstraction in that it:Emphasizes relevant

9、 characteristicsSuppresses other characteristics,2024/3/18,14,,,,,,,,,,a + b = 10,ClassCourse,PropertiesNameLocationDays offeredCredit hoursStart timeEnd time,BehaviorAdd a studentDelete a studentGet course ro

10、sterDetermine if it is full,類舉例,2024/3/18,15,,Professor,,,,,,Professor Clark,a + b = 10,類的表示,A class is represented using a compartmented rectangle,2024/3/18,16,類的組成,A class is comprised of three sectionsThe first sect

11、ion contains the class nameThe second section shows the structure (attributes)The third section shows the behavior (operations),2024/3/18,17,,對象的類,How many classes do you see?,2024/3/18,18,,Objects,,Class,,Professor,,,

12、類和對象之間的關(guān)系,A class is an abstract definition of an objectIt defines the structure and behavior of each object in the classIt serves as a template for creating objects Objects are grouped into classes,2024/3/18,19,,Clas

13、s,,Attribute,,Object,,Attribute Value,,屬性 Attribute,2024/3/18,20,Class,,Operation,,操作 Operation,2024/3/18,21,OO Principle:Encapsulation,多態(tài) Polymorphism,The ability to hide many different implementations behind a single

14、interface,,,,,Realization relationship,,(stay tuned for realization relationships),接口 Interface,Interfaces formalize polymorphismInterfaces support “plug-and-play” architectures,2024/3/18,23,Source FileName,,,,>Exe

15、cutableName,OO Principle:Encapsulation,組件 Component,A non-trivial, nearly independent, and replaceable part of a system that fulfills a clear function in the context of a well-defined architecture A component may be

16、A source code componentA run time components orAn executable component,Package Name,OO Principle:Modularity,包 Package,A package is a general purpose mechanism for organizing elements into groupsA model element which

17、can contain other model elementsUsesOrganize the model under developmentA unit of configuration management,2024/3/18,25,,關(guān)系Relationships,AssociationAggregationCompositionDependencyGeneralizationRealization,20

18、24/3/18,26,Superclass (parent),Subclasses,Generalization Relationship,,Ancestor,Descendents,Example: Single Inheritance,One class inherits from another,2024/3/18,27,,,Airplane,,,,Helicopter,,,,Wolf,,,,Horse,,,,FlyingThin

19、g,,,,,,,Animal,,,,,,,Bird,,,,,,multipleinheritance,,Use multiple inheritance only when needed, and always with caution !,Example: Multiple Inheritance,A class can inherit from several other classes,,Inheritance leverag

20、es the similarities among classes,What Gets Inherited?,A subclass inherits its parent’s attributes, operations, and relationshipsA subclass may:Add additional attributes, operations, relationshipsRedefine inherited op

21、erations (use caution!)Common attributes, operations, and/or relationships are shown at the highest applicable level in the hierarchy,2024/3/18,29,,Truck,,,Tonnage噸,,GroundVehicle,,,weight,licenseNumber,,,Car,owner,,,,,

22、register( ),getTax( ),,0..*,,,1,Superclass (parent),Subclass,generalization,,size,,Example: What Gets Inherited,Strengths of Object Orientation,A single paradigmFacilitates architectural and code reuseModels more close

23、ly reflect the real worldMore accurately describe corporate data and processesDecomposed based on natural partitioningEasier to understand and maintainStabilityA small change in requirements does not mean massive ch

24、anges in the system under development,,Order,,Product,,,,Ship via,A Simple Sales Order Example,Class Diagram for the Sales Example,seller,buyer,item sold,shipping mechanism,Effect of Requirements Change,Suppose you need

25、a new type of shipping vehicle ...,Salesperson,Product,Sale,,,,,Corporate,Customer,,,Individual,Vehicle,,,,,,,,seller,buyer,item sold,shipping mechanism,,2024/3/18,34,面向?qū)ο蟮臏y試層次,操作/方法測試:使用傳統(tǒng)的單元測試技術(shù)類測試:類內(nèi)的測試集成測試:類間的測試,主要

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 眾賞文庫僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論