Docsity

Object-Oriented Software Design: Lecture Notes on Basic Mechanisms and Key Concepts - Prof, Lecture notes of Software Engineering

Partial preview of the text

Download Object-Oriented Software Design: Lecture Notes on Basic Mechanisms and Key Concepts - Prof and more Lecture notes Software Engineering in PDF only on Docsity!

Object-Oriented

Software Design (lecture 7)

Basic Mechanisms:

Objects:

 A real-world entity.

 A system is designed as a set of

interacting objects.

Consists of data (attributes) and

functions (methods) that operate on data

 Hides organization of internal information

(Data abstraction)

 Examples: an employee, a book etc.

 Class:

Instances are objects

Template for object creation

Examples: set of all employees,

different types of book

 Methods and message:

 Operations supported by an

object

 Means for manipulating the data

of other objects

 Invoked by sending message

 Examples: calculate_salary, issue-

book, member_details, etc.

 Multiple Inheritance:

Subclass can inherit attributes and

methods from more than one base

class

Multiple inheritance is represented

by arrows drawn from the subclass to

each of the base classes

LibraryMember

UnderGrad PostGrad Research

Faculty Students Staff

Base Class

Derived

Classes

LibraryMember

UnderGrad PostGrad Research

Faculty Students Staff

Base Class

Multiple

Inheritance

 Advantages of abstraction:

Reduces complexity of software

Increases software productivity

It is shown that software

productivity is inversely

proportional to software

complexity

 Encapsulation:

Objects communicate outside world

through messages

Objects data encapsulated within its

methods

 Polymorphism:

 Denotes to poly (many)

morphism (forms)

 Same message result in

different actions by different

objects (static binding)

 Dynamic binding:

In inheritance hierarchy, an object can be

assigned to another object of its ancestor

class

A method call to an ancestor object would

result in the invocation of appropriate

method of object of the derived class

 Composite objects:

Object containing other objects

 Code and design reuse

 Increased productivity

 Ease of testing & maintenance

 Better understandability

 Its agreed that increased

productivity is chief advantage

Advantages

of Object-oriented design

 UML is a modelling language

 Not a system design or

development methodology

 Used to document object-

oriented analysis and design

 Independent of any specific

design methodology

Object

modelling using UML

 Based Principally on

 OMT [Rumbaugh 1991]

 Booch’s methodology[Booch 1991]

 OOSE [Jacobson 1992]

 Odell’s methodology[Odell 1992]

 Shlaer and Mellor [Shlaer 1992]

UML