Chapter 2 Basic Principles of the Object-Oriented Paradigm 2.1 Abstraction

Similar documents
ArchiMate 2.0. Structural Concepts Behavioral Concepts Informational Concepts. Business. Application. Technology

CHAPTER 9 DESIGN ENGINEERING. Overview

Chapter 8: Enhanced ER Model

Introduction to Object-Oriented Programming

Programming II. Modularity 2017/18

Setting the stage... Key Design Issues. Main purpose - Manage software system complexity by improving software quality factors

NOTES ON OBJECT-ORIENTED MODELING AND DESIGN

OOAD - OBJECT MODEL. The concepts of objects and classes are intrinsically linked with each other and form the foundation of object oriented paradigm.

Object-Oriented Systems Analysis and Design Using UML

University of Calgary Department of Electrical and Computer Engineering. SENG : Object Oriented Analysis and Design Behrouz Homayoun Far

LECTURE 3: SOFTWARE DESIGN. Software Engineering Mike Wooldridge

1. Software Systems Complexity, OO Paradigm, UML

Software Design. Levels in Design Process. Design Methodologies. Levels..

Information Hiding and Aspect-Oriented Modeling

Modularity Guidelines for design in any programming language

Software Design Report

SOFTWARE ENGINEERING Prof.N.L.Sarda Computer Science & Engineering IIT Bombay. Lecture #10 Process Modelling DFD, Function Decomp (Part 2)

Credit where Credit is Due. Lecture 4: Fundamentals of Object Technology. Goals for this Lecture. Real-World Objects

Design Pattern What is a Design Pattern? Design Pattern Elements. Almas Ansari Page 1

Chapter 10. Object-Oriented Analysis and Modeling Using the UML. McGraw-Hill/Irwin

Modularity!! Guidelines for design! in any programming language!

CMPT Data and Program Organization

Compositional Design Principles

Introducing the UML Eng. Mohammed T. Abo Alroos

The major elements of the object-oriented model

Chapter 2 Overview of the Design Methodology

Component Design. Systems Engineering BSc Course. Budapest University of Technology and Economics Department of Measurement and Information Systems

Suggested answers are provided below. These answers are presented top-down, left to right.

Hierarchies in a multidimensional model: From conceptual modeling to logical representation

Contemporary Design. Traditional Hardware Design. Traditional Hardware Design. HDL Based Hardware Design User Inputs. Requirements.

Alignment of Business and IT - ArchiMate. Dr. Barbara Re

Towards a formal model of object-oriented hyperslices

Produced by. Design Patterns. MSc in Communications Software. Eamonn de Leastar

Copyright 2016 Ramez Elmasri and Shamkant B. Navathe

Lecturer: Sebastian Coope Ashton Building, Room G.18 COMP 201 web-page:

Object-Oriented Programming Paradigm

SEEKING THE ACTUAL REASONS FOR THE "NEW PARADIGM" IN THE AREA OF IS ANALYSIS 2. GENERAL CHARACTERISTICS OF THE "STRUCTURED APPROACH" IN IS DEVELOPMENT

SOFTWARE DESIGN COSC 4353 / Dr. Raj Singh


Chapter 8: Class and Method Design

BOM Management with Optymo

Object-Oriented Introduction

OBJECT ORIENTED SYSTEM DEVELOPMENT Software Development Dynamic System Development Information system solution Steps in System Development Analysis

Object Relationships

Enhanced Entity-Relationship (EER) Modeling

Exam in TDDB84: Design Patterns,

Module 10 Inheritance, Virtual Functions, and Polymorphism

PRINCIPLES OF SOFTWARE DESIGN

Week 6: Data. Let's focus first on application domain data.

SOFTWARE ARCHITECTURE & DESIGN INTRODUCTION

UML 2.0 UML 2.0. Scott Uk-Jin Lee. Division of Computer Science, College of Computing Hanyang University ERICA Campus

Introduction to Object Oriented Analysis and Design

WATERSHED, HIERARCHICAL SEGMENTATION AND WATERFALL ALGORITHM

Software Design Fundamentals. CSCE Lecture 11-09/27/2016

Software Engineering

Chemometrics. Description of Pirouette Algorithms. Technical Note. Abstract

Software Paradigms (Lesson 3) Object-Oriented Paradigm (2)

System Analysis and Design. Introduction: Object Oriented Design

3. Blackboard and Client/Server Systems

Conceptual Data Modeling by David Haertzen

INFORMATION RETRIEVAL SYSTEM: CONCEPT AND SCOPE

Object- Oriented Design with UML and Java Part I: Fundamentals

Lecturer: Sebastian Coope Ashton Building, Room G.18 COMP 201 web-page:

Sub- PPL Unit-I Class-SE Comp

Chapter (4) Enhanced Entity-Relationship and Object Modeling

Enhanced Entity- Relationship Models (EER)

CS112 Lecture: Defining Instantiable Classes

340 Review Fall Midterm 1 Review

ResolutionDefinition - PILIN Team Wiki - Trac. Resolve. Retrieve. Reveal Association. Facets. Indirection. Association data. Retrieval Key.

Tutorial notes on. Object relational structural patterns

Generic and Domain Specific Ontology Collaboration Analysis

Lecture 6B Hierarchical/Concurrent State Machine Models (HCFSM)

Introducing MESSIA: A Methodology of Developing Software Architectures Supporting Implementation Independence

ECE468 Computer Organization & Architecture. The Design Process & ALU Design

Maintainable Software. Software Engineering Andreas Zeller, Saarland University

Project 1 Computer Science 2334 Spring 2016 This project is individual work. Each student must complete this assignment independently.

1 Executive Overview The Benefits and Objectives of BPDM

Part III. Issues in Search Computing

06. Analysis Modeling

FLYNN S TAXONOMY OF COMPUTER ARCHITECTURE

THE ENHANCED ER (EER) MODEL CHAPTER 8 (6/E) CHAPTER 4 (5/E)

Introduction to OO Concepts

Sorting. Sorting. Selection sort

Object-Oriented Modeling Using UML. CS151 Chris Pollett Aug. 29, 2005.

DATABASE SYSTEM CONCEPTS AND ARCHITECTURE

MCQS for Midterm cs504 Combined by Anees Ahmad

CMPT 354 Database Systems I

The Challenge. Principles of Software Design

Object-Oriented Programming

Object-Oriented Design

Practical Object-Oriented Design in Ruby

Principles of Software Design. Software Engineering Alessio Gambi Saarland University

The Strategy Pattern Design Principle: Design Principle: Design Principle:

SOLID Principles. Equuleus Technologies. Optional Subheading October 19, 2016

Chapter No. 2 Class modeling CO:-Sketch Class,object models using fundamental relationships Contents 2.1 Object and Class Concepts (12M) Objects,

1. BlueJ bank example with subclasses of BankAccount 2. Transparency of UML diagram for BankAccount class hierarchy


The Essence of Object Oriented Programming with Java and UML. Chapter 2. The Essence of Objects. What Is an Object-Oriented System?

Design Engineering. Dr. Marouane Kessentini Department of Computer Science

Programming Languages & Paradigms PROP HT Abstraction & Modularity. Inheritance vs. delegation, method vs. message. Modularity, cont d.

Transcription:

Chapter 2 Basic Principles of the Object-Oriented Paradigm 2.1 Abstraction One of the most appreciated advantages of object-oriented versus other modern programming paradigms is the direct support for each of the most important and used principles of abstraction. The Dictionary of the Object Technology defines abstraction as Any model that includes the most important, essential, or distinguishing aspects of something while suppressing or ignoring less important, immaterial, or diversionary details. The result of removing distinctions so as to emphasize commonalities. Abstraction is an effective way to manage complexity as it allows for concentrating on relevant characteristics of a problem. Abstraction is a very relative notion; it is domain and perspective dependent. The same characteristics can be relevant in a particular context and irrelevant in another one. The abstraction principles used in the object-oriented approach are classification/instantiation, aggregation/decomposition, generalization/specialization, and grouping/individualization. By providing support for the abstraction principles, the object-oriented paradigm makes it possible to use conceptual modeling as an efficient tool during the phases of analysis and design. Conceptual modeling can be defined as the process of organizing our knowledge of an application domain into hierarchical rankings or orderings of abstraction, in order to better understand the problem in study [94]. Classification is considered to be the most important abstraction principle. It consists of depicting from the problem domain things that have similarities and grouping them into categories or classes. Things that fall into a class/category have in common properties that do not change over time. Instantiation is the reverse operation of classification. It consists of creating individual instances that will fulfill the descriptions of their categories or classes. The majority of object-oriented languages provide capabilities for creating instances of classes/categories. Figure 2.1 shows an example of classification and instantiation. Concept Tractor represents a set of properties that are typical for a tractor, regardless of their brand, horse power, etc. Therefore, concept Tractor represents a classification. P.J. Papajorgji and P.M. Pardalos, Software Engineering Techniques Applied to Agricultural Systems, Springer Optimization and Its Applications 93, DOI 10.1007/978-1-4899-7463-1 2, Springer Science+Business Media LLC 2014 9

10 2 Basic Principles of the Object-Oriented Paradigm Fig. 2.1 Examples of classification and instantiation Fig. 2.2 Examples of aggregation and decomposition Bob s Tractor is a particular tractor that has some particular properties, the most important being that it is Bob s property. Therefore, concept Bob s Tractor represents an instantiation. The second abstraction principle is aggregation. Aggregation refers to the principle that considers things in terms of part-whole hierarchies. Concepts in a problem domain can be treated as aggregates (i.e., composed of other concepts/parts). A part itself can be considered as composed of other parts of smaller granularity. Decomposition is the reverse operation of aggregation; it consists of identifying parts of an aggregation. Object-oriented languages provide support for aggregation/decomposition by allowing objects to have attributes that are objects themselves. Thus, complex structures can be obtained by using the principle of aggregation. Note that some authors use the term composition instead of aggregation. Figure 2.2 shows an example of aggregation and decomposition. Concept Tractor can be considered as an aggregation/composition of other concepts such as Chassis, Body, and Engine. Concept Body can be considered as one of the parts composing a more complex concept such as Tractor. The third abstraction principle is generalization. Generalization refers to the principle that considers construction of concepts by generalizing similarities existing in other concepts in the problem domain. Based on one or more given classes, generalization provides the description of more general classes that capture the common similarities of given classes. Specialization is the reverse operation of generalization. A concept A is a specialization of another concept B if A is similar to B and A provides some additional properties not defined in B.

2.1 Abstraction 11 Fig. 2.3 Examples of generalization and specialization Fig. 2.4 Examples of grouping and individualization Object-oriented languages provide support for generalization/specialization as they allow for creating subclasses of exiting classes and/or creating more general classes (superclasses) of existing classes. Creating a subclass of an existing class corresponds to specialization and creating a superclass of an existing class corresponds to generalization. It is important to note that concept A is a generalization of concept B if and only if B is a specialization of concept A [79]. Figure 2.3 shows an example of generalization and specialization. Concept Truck is a specialization of concept Vehicle. This is because Truck has all the properties of concept Vehicle and some additional ones that make it a special Vehicle. In reverse, concept Vehicle is a generalization of concept Truck as all trucks are vehicles. The fourth abstraction and perhaps the least obvious is grouping [94]. In conceptual modeling, often a group of concepts needs to be considered as a whole, not because they have similarities but because it is important that they be together for different reasons. Object-oriented languages provide a mechanism for grouping concepts together such as sets, bags, lists, and dictionaries. Individualization is the reverse operation of grouping. It consists of identifying an individual concept selected among other concepts in a group. Individualization is not as well established as a form of abstraction [94]. Figure 2.4 shows an example of grouping and individualization.

12 2 Basic Principles of the Object-Oriented Paradigm All tractors used in a farm can be grouped in one category regardless of their brand, color, horsepower, and year of production and be represented by one concept such as Tractors. In case we need to use one of them with a certain horsepower, then we need to browse the set of tractors and find that particular individual that satisfies our needs. In this case, we have individualized one element of the set based on some particular criterion. When we say Tom s Tractor, we have used the ownership as criterion for individualizing one of the tractors, the one that belongs to Tom. 2.2 Encapsulation The Dictionary of the Object Technology defines encapsulation as The physical location of features (properties, behaviors) into a single black box abstraction that hides their implementation behind a public interface. Often, encapsulation is referred to as information hiding. An object hides the implementation of its behavior behind its interface or its public face. Other objects can use its behavior without having detailed knowledge of its implementation. Objects know only the kind of operations they can request other objects to perform. This allows software designers to abstract from irrelevant details and concentrate on what objects will perform. An important advantage of encapsulation is the elimination of direct dependencies on a particular implementation of an object s behavior. The object is known from its interface, and clients can use the object s behavior by only having knowledge of its interface; the particular implementation of an object s interface is not important. Therefore, the implementation of the object s behavior can change any time without affecting the object s use. Encapsulation helps manage complexity by identifying a coherent part of this complexity and assigning it to individual objects. The fact that an object hides the implementation of its behavior by exposing only its public face could be beneficial to other objects that need its behavior. The interested objects could consider more than one option while looking for a specific functionality that satisfies their needs. They need only to examine the interfaces of candidate objects. Objects with similar behavior could serve as substitute to each other. 2.3 Modularity The Dictionary of the Object Technology defines modularity as The logical and physical decomposition of things (e.g. responsibilities and software) into small, simple groupings (e.g., requirements and classes, respectively), which increase the achievements of software-engineering goals.

2.3 Modularity 13 Modularity is another way of managing complexity by dividing large and complex systems into smaller and manageable pieces. A software designing method is modular if it allows designers to produce software systems by using independent elements connected by a coherent, simple structure. Meyer [64] defines a software construction method to be modular if it satisfies the five criteria: Modular Decomposability: a software construction method satisfies modular decomposability if it helps in the task of decomposing a software problem into a small number of less complex subproblems, connected by a simple structure, and independent enough to allow further work to proceed separately on each of them. Modular Composability: a software construction method satisfies modular composability if it favors the production of software elements which may then be freely combined with each other to produce new systems, possible in an environment quite different from the one in which they were initially developed. Modular Understandability: a software construction method satisfies modular understandability if it helps produce software in which each module can be understood without having to examine other interrelated modules. Modular Continuity: a software construction method satisfies modular continuity if a small change in the requirements will impact just one or a small number of modules. Modular Protection: a software construction method satisfies modular protection if the effect of an exception occurring at run time will impact only the corresponding module or a few neighboring modules. The concept of modularity and the principles for developing modular software in the object-oriented approach are encapsulated in the concept of class. Classes are the building blocks in the object-oriented paradigm.

http://www.springer.com/978-1-4899-7462-4