The Object model The Evolution of the Object Model Elements of the Object Model Applying the Object Model.

Slides:



Advertisements
Similar presentations
Object-Oriented Programming Basics Prof. Ankur Teredesai, Computer Science Department, RIT.
Advertisements

Ch:8 Design Concepts S.W Design should have following quality attribute: Functionality Usability Reliability Performance Supportability (extensibility,
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 12Slide 1 Software Design l Objectives To explain how a software design may be represented.
1 OBJECT-ORIENTED CONCEPTS. 2 What is an object?  An object is a software entity that mirrors the real world in some way.  A software object in OOP.
Classes and Object- Oriented... tMyn1 Classes and Object-Oriented Programming The essence of object-oriented programming is that you write programs in.
Object Oriented System Development with VB .NET
C++ Training Datascope Lawrence D’Antonio Lecture 4 An Overview of C++: What is a Class/Object?
7M701 1 Class Diagram advanced concepts. 7M701 2 Characteristics of Object Oriented Design (OOD) objectData and operations (functions) are combined 
Object-oriented design CS 345 September 20,2002. Unavoidable Complexity Many software systems are very complex: –Many developers –Ongoing lifespan –Large.
C++ fundamentals.
State,identity and behavior of objects Sem III K.I.R.A.S.
 Computer Science 1MD3 Introduction to Programming Michael Liut Ming Quan Fu Brandon.
Systems Analysis and Design in a Changing World, Fifth Edition
Welcome to OBJECT ORIENTED PROGRAMMIN Date: 10/09/2014 Prepared By Prepared By : VINAY ALEXANDER PGT(CS) KV jhagrakhand.
1 A Student Guide to Object- Orientated Systems Chapter 4 Objects and Classes: the basic concepts.
OBJECT AND CLASES: THE BASIC CONCEPTS Pertemuan 8 Matakuliah: Konsep object-oriented Tahun: 2009.
The Evolution of the Object Model OOAD. The Evolution of the Object Model software engineering trends observed The shift in focus from programming-in-the-small.
Copyright 2002 Prentice-Hall, Inc. Modern Systems Analysis and Design Third Edition Jeffrey A. Hoffer Joey F. George Joseph S. Valacich Chapter 20 Object-Oriented.
Classes and Objects OOAD.
OOP Class Lawrence D’Antonio Lecture 3 An Overview of C++
© 2005 Prentice Hall9-1 Stumpf and Teague Object-Oriented Systems Analysis and Design with UML.
1 What is OO Design? OO Design is a process of invention, where developers create the abstractions necessary to meet the system’s requirements OO Design.
 Computer Science 1MD3 Introduction to Programming Michael Liut Ming Quan Fu Brandon.
Elements of OO Abstraction Encapsulation Modularity Hierarchy: Inheritance & Aggregation 4 major/essential elements3 minor/helpful elements Typing Concurrency.
Relationships Relationships between objects and between classes.
OOP (Object Oriented Programming) Lecture 1. Why a new paradigm is needed? Complexity Five attributes of complex systems –Frequently, complexity takes.
What is Object? Using Brian Mitchell’s notes for reference
MANAGING COMPLEXITY Lecture OO01 Introduction to Object-oriented Analysis and Design Abstract Data Types.
Introduction to Object Oriented Programming Lecture-3.
Basic Characteristics of Object-Oriented Systems
Welcome to OBJECT ORIENTED PROGRAMMING Prepared By Prepared By : VINAY ALEXANDER PGT(CS) KV jhagrakhand.
11 Systems Analysis and Design in a Changing World, Fifth Edition.
MAITRAYEE MUKERJI Object Oriented Programming in C++
Appendix 3 Object-Oriented Analysis and Design
Object-Oriented Design
CHAPTER
Programming paradigms
Object Oriented Programming
Business System Development
Roberta Roth, Alan Dennis, and Barbara Haley Wixom
The Movement To Objects
Course Outcomes of Object Oriented Modeling Design (17630,C604)
CHAPTER 5 GENERAL OOP CONCEPTS.
Object-Oriented Programming Basics
Object-Oriented Analysis and Design
Concepts of Object Orientation
Chapter 11 Object-Oriented Design
OOP What is problem? Solution? OOP
Review: Two Programming Paradigms
Differents between Structured Analysis and UML
11.1 The Concept of Abstraction
The Object Oriented Approach to Design
CSC 205 – Java Programming II
CSC 205 Programming II Lecture 2 Subclassing.
Object Oriented Analysis and Design
Chapter 10 Thinking in Objects
Advanced Programming in Java
UML Class Diagram.
Chapter 20 Object-Oriented Analysis and Design
Appendix A Object-Oriented Analysis and Design
Copyright 2007 Oxford Consulting, Ltd
Object-Oriented Programming
Object-Oriented PHP (1)
CPS120: Introduction to Computer Science
Object Oriented System Design Class Diagrams
Agenda Software development (SD) & Software development methodologies (SDM) Orthogonal views of the software OOSD Methodology Why an Object Orientation?
Appendix A Object-Oriented Analysis and Design
The Object Model Lecture OO02 Classes as Abstract Data Types
11.1 The Concept of Abstraction
Chapter 11 Abstraction - The concept of abstraction is fundamental in
Presentation transcript:

The Object model The Evolution of the Object Model Elements of the Object Model Applying the Object Model

Trends in Software Engineering The shift in focus from programming-in-the-small to programming-in-the-large The evolution of high-order programming languages First-Generation Languages (1954-1958) FORTRANI Mathematical expressions ALGOL 58 Mathematical expressions Flowmatic Mathematical expressions IPL V Mathematical expressions Second-Generation Languages (1959~1961) FORTRANII Subroutines, separate compilation ALGOL 60 Block structure, data types COBOL Data description, file handling Lisp List processing, pointers, garbage collection Third-Generation Languages (1962-1970) PL/1 FORTRAN + ALGOL + COBOL ALGOL 68 Rigorous successor to ALGOL 60 Pascal Simple successor to ALGOL 60 Simula Classes, data abstraction The Generation Gap (1970-1980) Many different languages were invented, but few endured

OOP, OOD, and OOA Object-Oriented Programming Object-oriented programming is a method of implementation in which programs are organized as cooperative collections of objects, each of which represents an instance of some class, and whose classes are all members of a hierarchy of classes united via inheritance relationships. Object-Oriented Design Object-oriented design is a method of design encompassing the process of object-oriented decomposition and a notation for depicting both logical and physical as well as static and dynamic models of the system under design. Object-Oriented Analysis Object-oriented analysis is a method of analysis that examines requirements from the perspective of the classes and objects found in the vocabulary of the problem domain.

Elements of the Object Model Kinds of Programming Paradigms Procedure-oriented Algorithms Object-oriented Classes and objects Logic-oriented Goals, often expressed in a predicate calculus Rule-oriented If-then rules Constraint-oriented Invariant relationships There are four major elements of Object model: (By major, we mean that a model without any one of these elements is not object- oriented.) Abstraction Encapsulation Modularity Hierarchy There are three minor elements of the object model: (By minor, we mean that each of these elements is a useful, but not essential, part of the object model.) Typing Concurrency Persistence

Abstraction An abstraction denotes the essential characteristics of an object that distinguish it from all other kinds of objects and thus provide crisply defined conceptual boundaries, relative to the perspective of the viewer.

Virtual machine abstraction Entity abstraction An object that represents a useful model of a problem domain or solution-domain entity Action abstraction An object that provides a generalized set of operations, all of which perform the same kind of function Virtual machine abstraction An object that groups together operations that are all used by some superior level of control, or operations that all use some junior-level set of operations Coincidental abstraction An object that: packages a set of operations that have no relation to each other

The abstraction of a temperature sensor in C++: //Temperature in degrees Fahrenheit typedef float Temperature; // Number uniquely denoting the location of a sensor typedef unsigned int Location; class TemperatureSensor { Public: TemperatureSensor(Location); ~TemperatureSensor() ; void calibrate(Temperature actualTemperature); Temperature currentTemperature() const; private: … };

Encapsulation Encapsulation is the process of compartmentalizing the elements of an abstraction that constitute its structure and behavior; encapsulation serves to separate the contractual interface of an abstraction and its implementation.

Modularity Modularity is the property of a system that has been decomposed into a set of cohesive and loosely coupled modules.

Hierarchy Hierarchy is a ranking or ordering of abstractions.

Typing Typing is the enforcement Of the class of an object, such, that objects of different types may not be interchanged, or at the most, they may be interchanged only in very restricted ways. Strong and Weak Typing

Concurrency Concurrency is tbe properly that distinguisbes an active object from one tbat is not active.

Persistence Persistence is theproperty of an object tbrougb which its existence transcends time (i.e. tbe object continues to exist after its creator ceases to exist) and/or space (i. e. the objects location moves from the address space in wbich it was created).

Applylng the Object Model Benefits of the Object Model The use of the object model helps us to exploit the expressive power of object-based and object-oriented programming languages The use of the object model encourages the reuse not only of software but of entire designs, leading to the creation of reusable application frame- works The use of the object model produces systems that are built upon stable intermediate forms, which are more resilient to change. Applications of the Object Model Air traffic control Investment strategiei Animation Mathematical analysis Open Issues What exactly are classes and objects? How does one properly identify the classes and objects that are relevant to a particular application? What is a suitable notation for expressing the design of an object-oriented system? What process can lead us to a weil-structured object-oriented system? What are the management implications of using object-oriented design?

Classes and Objects The Nature of an Object Relationships Among Objects The Nature of a Class Relationships Among Classes The Interplay of Classes and Objects On Building Quailty Classes and Objects

The Nature of an Object What Is and What Isnt an Object From the perspective of human cognition, an object is any of the following: A tangible and/or visible thing Something that may be apprehended intellectually Something toward which thought or action is directed

An object has state, behavior, and identity; the structure and behavior of similar objects are defined in their common class; the terms instance and object are interchangeable.

State Behavior Operations Identity The state of an object encompasses all of the (usually static) properties of tbe object plus tbe current (usually dynamic) values of each of these properties. Behavior Behavior is how an object acts and reacts, in terms of its state changes and message passing. Operations Modifier An operation that alters the state of an object Selector An operation that accesses the state of an object, but does not alter the state Iterator An operation that permits all parts of an object to be accessed in some well-defined order Identity “Identity is that property of an object which distinguishes it from all other objects "

Relationships Among Objects: Two kinds of object hierarchies are of particular interest in object-oriented analysis and design, namely: Links Aggregation The term link derives from Rumbaugh, who defines it as a "physical or conceptual connection between objects“ a link denotes the specific association through which one object (the client) applies the services of another object (the supplier), or through which one object may navigate to another.

As a participant in a link, an object may play one of three roles: Actor: An object that can operate upon other objects but is never operated upon by other objects; in some contexts, the terms active object and actor are interchangeable Server: An object that never operates upon other objects; it is only operated upon by other objects Agent : An object that can both operate upon other objects and be operated upon by other objects; an agent is usually created to do some work on behalf of an actor or another agent

Aggregation Whereas links denote peer-to-peer or client/supplier relationships, aggregation denotes a whole/part hierarchy, with the ability to navigate from the whole (also called the aggregate) to its parts (also known as its attributes). In this sense, aggregation is a specialized kind of association.

The Nature of a Class What Is and What lsn't a Class There are important differences between class and objects. Whereas an object is a concrete entity that exists in time and space, a class represents only an abstraction, the “essence" of an object, as it were. A class is a set of objects that share a common structure and a common behavior. What isn't a class? An object is not a class, although, curiously, as we will describe later, a class may be an object.

Interface and Implementation The interface of a class provides its outside view and therefore emphasizes the abstraction while hiding its structure and the secrets of its behavior. The implementation of a class is its inside view, which encompasses the secrets of its behavior. The interface of a class divided into three parts: Public: A declaration that is accessible to all clients Protected: A declaration that is accessible only to the class itself, its subclasses, and its friends Private: A declaration that is accessible only to the class itself and its friends

Relationships Among Classes Kinds of Relationships A daisy is a kind of flower. A rose is a (different) kind of flower. A petal is a part of both kinds of flowers. Ladybugs eat certain pests such as aphids, which may be infesting certain kinds of flowers There are three basic kinds of class relationships "is a" relationship "part of" relationship Association Most object-oriented languages provide direct support for some combination of the following relationships: Association Inheritance Aggregation Using Instantiation Metaclass

The Interplay of Classes and Objects Relationships Between Classes and Obiects Every object is the instance of some class, and every class has zero or more instances. For practically all applications, classes are static; therefore, their existence, semantics, and relationships are fixed prior to the execution of a program. Similarly, the class of most objects is static, meaning that once an object is created, its class is fixed. Role of Classes and Objects in Analysis and Design Identify the classes and objects that form the vocabulary of the problem domain. Invent the structures whereby sets of objects work together to provide the behaviors that satisfy the requirements of the problem.