SupplementarySlidesforSoftwareEngineering:APractitioner'sApproach,5/ecopyright©1996,&Associates,:APractitioner',slides,orhardcopymayNOTbeusedforshortcourses,industryseminars,Object-OrientedConceptsandPrinciplesTheOOProcessModelTheOOMindsetproblemdomainobjectsKeyConceptsclassesandclasshierarchiesinstancesinheritanceabstractionandhidingobjectsattributesmethodsencapsulationpolymorphismmessagesClassesobject-orientedthinkingbeginswiththedefinitionofaclassoftendefinedas:templategeneralizeddescriptionpattern“blueprint”...describingacollectionofsimilaritemsametaclass(alsocalledasuperclass)isacollectionofclassesonceaclassofitemsisdefined,aspecificinstanceoftheclasscanbedefinedBuildingaClassWhatisaClass?anizationalunitsplacesstructuresclassnameattributes:operations:Encapsulation/HidingTheobjectencapsulatesbothdataandthelogicalproceduresrequiredtomanipulatethedataAchieves“informationhiding”method#1datamethod#2method#4method#5method#6ClassHierarchychairtabledesk"chable"instancesofchairfurniture(superclass)subclassesofthefurnituresuperclass
Chapter20 来自淘豆网www.taodocs.com转载请标明出处.