modern information systems

19
Modern Information Systems

Upload: tejasmali123

Post on 12-Dec-2015

219 views

Category:

Documents


1 download

DESCRIPTION

Modern Information Systems

TRANSCRIPT

Page 1: Modern Information Systems

Modern Information Systems

Page 2: Modern Information Systems

Introduction

•Object oriented programming is a method of implementation in which programs are organized as co-operative 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.

Page 3: Modern Information Systems

A language is object oriented if and only if it satisfies the following requirements:1.It supports objects that are data abstractions

with an interface of named operations and a hidden local state.

2.Objects have an associated type (class).3.Types may inherit attributes from super types

(super classes).If a language does not provide direct support for inheritance then it is object based language.

Page 4: Modern Information Systems

•Object oriented analysis is a method of analysis that examines requirements from the perspective of the classes and the objects found in the vocabulary of the problem domain.•Object oriented analysis emphasizes the

building of real world models, using an object oriented view of the world.•Design methods emphasize the proper and

effective structuring of a complex system.•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.

Page 5: Modern Information Systems

Elements of Object Model

Object model is the conceptual framework for object oriented programming style.The four major elements of object model are:

(1) Abstraction (2) Encapsulation(3) Modularity (4) Hierarchy

The object oriented language must support all the major elements to be object oriented model.Three minor elements of object model are:

(1) Typing (2) Concurrency(3)PersistenceMinor means, these elements are useful but not essential part of the object model.

Page 6: Modern Information Systems

Abstraction

• Abstraction arises from recognition of similarities between certain objects, situations or processes in the real world and the decision to concentrate upon these similarities and to ignore for time being the differences.• An abstraction denotes the essential

characteristic of an object that distinguishes it from all other kinds of objects and thus provides crisply defined conceptual boundaries, relative to the perspective of the viewer.• It focuses on the outside view of an object and

so serves to separate an object’s essential behavior from its implementation.

Page 7: Modern Information Systems

Encapsulation

• Encapsulation is about the separating of the interface and the implementation. • A object would hide the internal

implementation and supply us only with what we need to know.• This would serve two causes:

1)If user can’t touch it they can’t break it.2)If you don’t know what the inside looks like, it

makes no difference if someone changes it (as long as it works the same way).

Page 8: Modern Information Systems

• If user can’t touch it they can’t break it.• We have to protect our data; we don’t want the user to be

able to set all the properties directly because the damage might be irreversible.• Therefore we need to be able to hide the data and only

allow it to be manipulated using our methods.• If you don’t know what the inside looks like, it makes

no difference if someone changes it (as long as it works the same way)• One of the major benefits of using a (good) interface is that

it hides the implementation.• An object-oriented interface does not need the user to tell

it what data to work on, so if some internal data representation changes, it has no impact on our code.

• While the internal source representation may change, the interface remains the same and no one using the object is affected by the change.

Page 9: Modern Information Systems

• Abstraction and Encapsulation are complementary concepts.–Abstraction focuses upon the observable behavior of the

object; where as encapsulation focuses upon the implementation that gives rise to this behavior.

• Encapsulation is most often achieved through information hiding.• Encapsulation is the process of compartmentalizing

the elements of an abstraction its structure and behavior; encapsulation serves to separate the contractual interface of an abstraction and its implementation.

Page 10: Modern Information Systems

• For abstraction to work, implementation must be encapsulated.–Each class must have two parts: an interface and the

implementation. –The interface of a class captures only its outside

view, encompassing our abstraction of the behavior common to all instances of the class.–The implementation of the class comprises the

representation of the abstraction as well as the mechanism that achieve the desired behavior.

Page 11: Modern Information Systems

Modularity

• The act of partitioning program into individual components can reduce its complexity to some degree.•Modularization consists of dividing a program

into modules which can be compiled separately but which have connections with other modules.• The connections between modules are

assumptions which the modules make about each other.•Modules have interface and implementation.• In C/C++ module interfaces are placed in .h

suffix (header) files, and module implementations are placed in files named with a .cpp suffix.

Page 12: Modern Information Systems

•Modularity is the property of a system that has been decomposed into a set of cohesive and loosely coupled modules.• System details in a module can change

independently without affecting other modules, i.e., implementation of a module can be changed independently without affecting other modules, if the interface of module remains unchanged.

Page 13: Modern Information Systems

•Object coupling describes the degree of interrelationships among the objects that make up a system.• The more any one object knows about any

other object in the system, the tighter (worse) the coupling is between those two objects.•Object cohesion is a measure of how logically

related the components of the external view of an object are to each other.•We want our objects to be as cohesive as

possible for two reasons:–Objects with low cohesion are more likely to be

changed and are more likely to have undesirable side effects when they are changed–Objects with low cohesion are not easily reusable.

Page 14: Modern Information Systems

Hierarchy

• The system can be greatly simplified if we identify the hierarchy relationship between objects.•Hierarchy is the ranking or ordering of

abstraction.• In a complex system hierarchy is of two types:–Class structure i.e., “is a [Inheritance]” hierarchy–Object structure i.e., “part of [Aggregation]”

hierarchy.

Page 15: Modern Information Systems

Typing (Polymorphism)

• 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 the very restricted ways.• A given programming language may be strongly

typed, weakly typed or even untyped.• Strongly typed language means type

conformance is strictly enforced: operations cannot be called upon an object unless the exact signature of that operation defined in the object’s class or superclass. Violation of type conformance can be detected at the time of compilation.• In an untyped language: a client can send any

message to any class (although a class may not be know how to respond to the message). Violation of type conformance may not be known until execution as execution errors.• C++ is a strongly typed language because

expressions that involve operations are checked for type correctness at the time of compilation.

Page 16: Modern Information Systems

Static and Dynamic Binding• Strong typing refers to type consistency,

whereas static typing also known as static binding or early binding refers to the time when names are bound to types. • Static binding means that the types of all

variables and expressions are fixed at the time of compilation;•Dynamic binding or late binding means that

the types of all variables and expressions are not known until runtime.

Page 17: Modern Information Systems

Concurrency

• Concurrency focuses upon process abstraction and synchronization.• The object is a concept that unifies two

different view points: –Each object may represent separate thread of

control. Such objects are called active.–Object oriented systems consist of a set of co-

operative objects, some of which are active and thus serves as centers of independent activity.

• Concurrency is the property that distinguishes one active object from one that is not active.

Page 18: Modern Information Systems

Persistence

• An object in software takes up some amount of space and exists for a particular amount of time. •Objects usually get destroyed once a program

finishes its execution. • For objects to be stored permanently (i.e.

across different executions), they must be declared permanent or persistent.• Persistence is the property of an object through

which its existence transcends time (i.e., the object continues to exist after its creator ceases to exist) and or space (i.e, the objects location moves from the address space in which it was created.)

Page 19: Modern Information Systems

The spectrum of object persistence encompasses:1)Transient results in expression evaluation.2)Local variables in procedure activations.3)Own variables, global variables and heap items

whose extent is different from their scope.4)Data that exists between executions of a

program.5)Data that exists between various versions of a

program.6)Data that outlives the program.Traditional programming languages usually address only the first three kinds of objects persistence, persistence if the last three kinds is typically the domain of database technology.