200 likes | 855 Views
Object-Oriented Analysis and Design. “A system of objects interacting to perform the given tasks”. Lecture Objectives. To introduce the basic concepts of object-oriented analysis and design
E N D
Object-Oriented Analysis and Design “A system of objects interacting to perform the given tasks” TCS2411 Software Engineering
Lecture Objectives • To introduce the basic concepts of object-oriented analysis and design • To understand the difference between object-oriented analysis and design and other analysis and design methods • To describe the main characteristics of object-oriented system TCS2411 Software Engineering
An Object-Oriented System Object Message TCS2411 Software Engineering
Object-Orientation Problem Object-Oriented Concepts Object-Oriented Analysis ADT Object-Oriented Design Inheritance Object-Oriented Programming Identity Solution TCS2411 Software Engineering
Object-Oriented Analysis “A method of analysis that examines requirements from the perspective of classes and objects found in the vocabulary of the problem domain” (Booch, 1994) TCS2411 Software Engineering
Object-Oriented Analysis • Examining the problem domain/statement to identify objects • Identify entities, relationships and operations of the problem domain • Understanding the role of the objects by examining the relevant data and processes TCS2411 Software Engineering
Object-Oriented Design “[Object-oriented] design is that portion of the lifecycle that prepares definitions as to how the system will accomplish its requirements. The models prepared in analysis are either refined, or transformed, into design models that depict the physical nature of the software product.” (Berard, 1992) TCS2411 Software Engineering
Object-Oriented Design • Build the logical models and hierarchy of the objects and classes for implementation • Creating new classes to complete the functionality of the solution • Refining the classes for smoother operation and efficiency e.g. through migration of operations and creating of subclasses TCS2411 Software Engineering
What is Object? • Representation of real-world objects and concepts in software domain • Typically a producer or consumer of information item in computer system • An object consists of attributes and operations • Attributes - data structures/elements • Operations - processes for controlling/manipulating attributes TCS2411 Software Engineering
Example of Object Object: Chair Cost : RM30 Dimensions : 1X1X2 Weight: 1kg Location: (2,2,3) Colour: black Move Buy Sell Weigh TCS2411 Software Engineering
Typical objects • External entities that produce or consume information in a computer-based system • Things that are part of the information domain for the problem • Occurrences or events that occur within the context of system operation • Roles played by people who interact with the system TCS2411 Software Engineering
Typical objects (Continued) • Organisational units that are relevant to an application • Places that establish the context of the problem and the overall function of the system • Structures that define a class of objects or, in the extreme, related classes of objects TCS2411 Software Engineering
Class • Set of objects with similar attributes and operations • Objects are instances of classes • Classes are ‘frames’ for objects (basically the ‘types’ for the objects) TCS2411 Software Engineering
Example of Class Class: Furniture Cost Dimensions Weight Location Colour Move Buy Sell Weigh TCS2411 Software Engineering
Object-Oriented Concepts • Abstraction: Identifying the important features of objects to be represented • Modularity: software is separated into individual elements that can be grouped together to form the solution • Information Hiding: the details of implementation are hidden from all program elements outside the object TCS2411 Software Engineering
Object-Oriented Concepts (Continued) • Encapsulation: Combination of attributes and operations into a single entity • Message passing: Mechanism to communicate between objects • Inheritance: Relationship between classes that allows a class to inherit all attributes and operations of another class • Polymorphism: Different response to the same message by similar objects TCS2411 Software Engineering
Message Passing Student store marks done Program give marks marks print report done Report TCS2411 Software Engineering
Inheritance Furniture Chair Table Yeoh’s chair Ali’s chair TCS2411 Software Engineering
Polymorphism Hare run done Program run done Tortoise TCS2411 Software Engineering
References • “Software Engineering: A Practitioner’s Approach” 5th Ed. by Roger S. Pressman, Mc-Graw-Hill, 2001 • “Object-Oriented Modeling and Design” by James Rumbaugh et al, Prentice Hall, 1991 • “Object Orientation” by Setrag Khoshafian & Razmik Abnous, John Wiley & Sons, 1995 TCS2411 Software Engineering