上降通大(4)The Liskov Substitution Principle SHANGHAI JIAO TONG UNIVERSITY If an object of type s can be substituted in all the places where an object of type T is expected,then S is a subtype of T 100 Percentage Principle ·lS-A Principle Software Engineering
Software Engineering (4) The Liskov Substitution Principle If an object of type S can be substituted in all the places where an object of type T is expected, then S is a subtype of T • 100 Percentage Principle • IS-A Principle
上游充通大学 SHANGHAI JIAO TONG UNIVERSITY 3.Design Patterns Builder State 节计 Bridge Observer 骨节 Software Engineering
Software Engineering 3. Design Patterns
上游充通大兽 SHANGHAI JIAO TONG UNIVERSITY Finding Objects The hardest problems in object-oriented system development are: ·ldentifying objects Decomposing the system into objects Requirements Analysis focuses on application domain: Object identification System Design addresses both,application and implementation domain: Subsystem Identification Object Design focuses on implementation domain: Additional solution objects Software Engineering
Software Engineering Finding Objects The hardest problems in object-oriented system development are: • Identifying objects • Decomposing the system into objects Requirements Analysis focuses on application domain: • Object identification System Design addresses both, application and implementation domain: • Subsystem Identification Object Design focuses on implementation domain: • Additional solution objects
上游通大学 Techniques for Finding Objects SHANGHAI JIAO TONG UNIVERSITY Requirements Analysis 。 Start with Use Cases.Identify participating objects Textual analysis of flow of events (find nouns,verbs,... Extract application domain objects by interviewing client (application domain knowledge) Find objects by using general knowledge System Design Subsystem decomposition Try to identify layers and partitions Object Design Find additional objects by applying implementation domain knowledge Software Engineering
Software Engineering Techniques for Finding Objects Requirements Analysis • Start with Use Cases. Identify participating objects • Textual analysis of flow of events (find nouns, verbs, ...) • Extract application domain objects by interviewing client (application domain knowledge) • Find objects by using general knowledge System Design • Subsystem decomposition • Try to identify layers and partitions Object Design • Find additional objects by applying implementation domain knowledge
上游充通大兽 Another Source for Finding Objects SHANGHAI JIAO TONG UNIVERSITY Design Patterns What are Design Patterns? A design pattern describes a problem which occurs over and over again in our environment Then it describes the core of the solution to that problem,in such a way that you can use the this solution a million times over,without ever doing it the same twice Software Engineering
Software Engineering Another Source for Finding Objects : Design Patterns What are Design Patterns? • A design pattern describes a problem which occurs over and over again in our environment • Then it describes the core of the solution to that problem, in such a way that you can use the this solution a million times over, without ever doing it the same twice