190 likes | 630 Views
Object-Oriented Software Engineering. CIS 375 Bruce R. Maxim UM-Dearborn. OO Concepts - 1. Object encapsulates both data (attributes) and data manipulation functions (called methods, operations, and services) Class
E N D
Object-Oriented Software Engineering CIS 375 Bruce R. Maxim UM-Dearborn
OO Concepts - 1 • Object • encapsulates both data (attributes) and data manipulation functions (called methods, operations, and services) • Class • generalized description (template or pattern) that describes a collection of similar objects • Superclass • a collection of objects • Subclass • an instance of a class
OO Concepts - 2 • Class hierarchy • attributes and methods of a superclass are inherited by its subclasses • Messages • the means by which objects exchange information with one another • Inheritance • provides a means for allowing subclasses to reuse existing superclass data and procedures • provides mechanism for propagating changes
OO Concepts - 3 • Polymorphism • mechanism that allows several objects in an class hierarchy to have different methods with the same name • instances of each subclass will be free to respond to messages by calling their own version of the method
Advantages of OO Architectures • Implementation details of data and procedures hidden from the outside world • reduces propagation of side effects after changes • Data structures and operators are merged in single entity or class • this facilitates reuse • Interfaces among encapsulated objects are simplified • reduces system coupling
Class Construction Options - 1 • Build new class from scratch without using inheritance • Use inheritance to create new class from existing class contains most of the desired attributes and operations • Restructure the class hierarchy so that the required attributes and operations can be inherited by the newly created class
Class Construction Options - 2 • Override some attributes or operations in an existing class and use inheritance to create a new class with (specialized) private versions of these attributes and operations.
Object-Oriented Evolutionary Process Model • Customer communication • Planning • Risk analysis • Engineering construction and analysis • Customer evaluation
Object-Oriented Software Construction • Identify candidate classes • Look-up classes in library • Extract classes if available • Engineer classes if not available • Object-oriented analysis (OOA) • Object-oriented design (OOD) • Object-oriented programming (OOP) • Object-oriented testing (OOT) • Put new classes in library • Construct Nth iteration of the system
Class Candidates • External Entities • devices or people • Things in Problem Domain • Reports, displays, signals • Events • completion of some task • Roles • manager, engineer, salesperson • Organizational Units • divisions, groups, teams • Structures • sensors, vehicles, computers
Criteria for Including Objects • Does object information need to be retained? • Does object provide a set of needed services that can change its attributes? • Does object have major (important) attributes? • Can you identify common attributes for all object instances? • Can you identify common operations for all object instances? • Is it an external entity that produces or consumes information?
Management of OO Projects • Establish a common process framework (CPF). • Use CPF & historic data to eliminate time & effort. • Specify products & milestones. • Define Q.A. checkpoints. • Manage changes. • Monitor project.
OO Project Milestones • Contracts completed. • OO Analysis completed. • OO Design completed. • OO Programming completed. • OO Testing completed.
OO Project Metrics • Number of scenario scripts. • Number of key classes. • Number of support classes. • (# key classes)/(# support classes). • Number of major iterations (around spiral model). • Number of completed contracts.
OO Estimation - 1 • Use some effort decomposition technique (e.g. FP) to determine size estimates. • Use O.O.A. to develop scenario scripts and count them. • Use O.O.A. to get the number of key classes. • Categorize types of the user interfaces to determine support class multiplier: NoUI = 2.0 TextUI = 2.25 GUI = 2.5 Complex GUI = 3.0
OO Estimation - 2 • Estimate the number of support classes # support classes = (# of key classes) * (UI #) • Estimate total effort Total effort = (key + support) * (average # of work units per class) • Cross check class based estimate (6) using Total effort = (avg. # of work units per script) * (# of scenario scripts) Note: takes 15-20 days to complete each class.