Chapter 2 Is Everything An Object Chapter Objectives
Chapter - 2 Is Everything An Object?
Chapter Objectives ► Why Focus on Objects? ► What is an Object in a Computer System? ► Types of Objects in Computer Systems § User Interface Objects § Operating Environment Objects § Task-Related Objects
Why Focus on Objects ► OO approach is a more natural approach for people. ► We naturally think in terms of objects. ► We classify objects into hierarchies ► We divide objects into parts.
Why Focus on Objects? ► In some way everything can be an object. ► The classification process is based on the features and behaviors that make up a class of objects ► A more specialized class “inherits” the features and behaviors of all classes above in a hierarchy ► People naturally organize information into classes and hierarchies of general classes and more specialized subclasses § generalization / specialization hierarchies ► People also naturally recognize that things can be divided into parts called whole-part hierarchies
Why Focus on Objects? ► Generalization/Specialization hierarchies and wholepart hierarchies allow us to understand things and define things and communicate about things in terms of other things we know ► Generalization/Specialization hierarchy is often described as a series of is a relationships ► We also understand things, define things, and communicate about things using the concept of an object and its parts § whole-part relationships
Sub Class Super Class Whole Part Aggregation Components Whole / Part
Sub Class Super Class Generalization Specialization Generalization / Specialization Source: http: //people. cs. vt. edu/~kafura/cs 2704/oop. swe. html
What is an Object? ►A person or thing through which action, thought, or feeling is directed. ► Anything visible or tangible. § material product or substance. § (Coad & Yourdon, 1991, p. 52) ► James Martin defines an object in relation to concepts. § From a very early age, we form concepts. § Each concept is a particular idea or understanding we have about our world. § These concepts allow us to make sense of and reason about the things in our world. § These things to which our concepts apply are called objects. § (Martin, 1993, p. 17)
What is an Object? ► Grady Booch uses a variety of approaches. tangible and/or visible thing something that may be apprehended intellectually something toward which thought or actions is directed an individual, identifiable item, unit, or entity, either real or abstract, with a well-defined role in the problem domain § anything with a crisply defined boundary § (Booch, 1994, p. 82) § §
What is an Object? ► Others object conclude that anything can be considered an § an object is a thing that can be distinctly identified § at the appropriate level of abstraction almost anything can be considered to be an object § a specific person, organization, machine, or event can be regarded as an object § (Coleman et el. 1994, p. 13)
What is an Object? ► All of these definitions acknowledge that an object is something that people think about, identify, act upon, or apply concepts to. ► Because different people have perceptions of the same object, what an object is depends upon the point of view of the observer. ► We describe an object on the basis of the features and behaviors that are relevant to us.
What is an Object in a Computer System ► Just about anything that can be considered to be an object can be identified as an object in a computer system. ► Peter Coad uses a concept he calls “object think”. § proposes that an object simply “knows things” and “knows how to do things”.
A generalization/specialization hierarchy of types of objects in a computer system
Types of Objects ► If anything can be considered to be an object at some level of abstraction then anything applying to computer systems can be considered to be an object. ► The types of objects in computer systems might be classified as user interface objects, operating system objects and task-related objects.
User Interface Object ► User interface objects are objects that physically appear on the screen and end-users directly interact with them. ► They have attributes, they exhibit behaviors, they interact with each other and most important we interact with them. ► Developers can use OO technology to develop a graphical user interface for their system.
Common User Interface Objects
Operating Environment Objects ► Operating environment object is another type. ► Client and Server in client/server architecture is OO. ► A server object provides services for others and client object requests services form others. ► To those developers who work on operating systems, OO mean operating system objects.
Task-Related Objects ► Task-related work. objects are used to actually complete § those things a computer application deals with or creates. ► Document Objects: documents are objects that know things and know how to do things. § i. e. word processing applications ► Multimedia Objects: Multimedia systems are another important type of application which contain sound, video, images. ► Problem Domain Objects: They are things typically involved in information processing systems § customers, products, order or employees § often correspond to the types of things identified when modeling data
Multimedia Object
Review Questions 1. 2. 3. 4. 5. 6. 7. What is a generalization/specialization hierarchy? What is a whole-part hierarchy? What purpose does it serve to classify things and define their parts? What is an object? What are user interface objects? What are operating environment objects? What are problem domain objects?
- Slides: 20