【正文】
lationships ? Redefine inherited operations (use caution!) ?Common attributes, operations, and/or relationships are shown at the highest applicable level in the hierarchy 2022/8/20 29 Truck Tonnage噸 GroundVehicle weight licenseNumber Car owner register( ) getTax( ) Person 0..* Trailer 1 Superclass (parent) Subclass generalization size Example: What Gets Inherited Strengths of Object Orientation ?A single paradigm ?Facilitates architectural and code reuse ?Models more closely reflect the real world ? More accurately describe corporate data and processes ? Deposed based on natural partitioning ? Easier to understand and maintain ?Stability ? A small change in requirements does not mean massive changes in the system under development Order Product Ship via A Simple Sales Order Example Class Diagram for the Sales Example Salesperson Product Sale Corporate Customer Individual Truck Vehicle Train seller buyer item sold shipping mechanism Effect of Requirements Change Suppose you need a new type of shipping vehicle ... Salesperson Product Sale Corporate Customer Individual Truck Vehicle Train seller buyer item sold shipping mechanism Change involves adding a new subclass Airplane 2022/8/20 34 面向?qū)ο蟮臏y試層次 ?操作 /方法測試:使用傳統(tǒng)的單元測試技術(shù) ?類測試:類內(nèi)的測試 ?集成測試:類間的測試,主要是操作的交互測試 ?系統(tǒng)測試:接口事件層上進(jìn)行測試,與傳統(tǒng)的集成測試相同。