Oop`s ppt

advertisement
✏✏✏✏ ☺☻☺☻☺☻☺✏✏✏✏
OOP- OBJECT OBJECT PROGRAMMING
By KRATI SHARMA
02
XI-B
Evolution of OOP’s
There are many problems faced by users which leads
to its evolution.
Some kinds of problems faced are as follows:1. Large programs because of their complexities are
more prone to errors.
2. Software errors can be expensive and even lifethreatening.
Two major types of programming languages :1. Low level languages (machine and assembly
languages).
2. High level languages.
Machine language
Instructions are written in binary code (using digits o and
1) is the only language computer can execute directly.
Assembly language
Instructions are written using symbolic names for
machine operators and operands ,makes programming
less tedious than machine language programming.
* Assembly language is then converted into machine
language using Assembly software.
High level language
It offers English like keywords , constructs for sequence
selection (decision) and iteration (looping) and use of
variables and constants. Thus it is very easy to
program with such languages as compared to low level
languages.
A Programming language serves two purposes:
i) It should provide a mode for the programmer to
specify actions to be executed.
ii) It should provide a set of concepts for the
programmer to use when thinking about what can
be done.
Middle level languages
The languages 'C' and 'C++' SERVES both the aspects
i.e, are close to machine as well as programmer.
Programming Pradigm
It means a way of thinking or doing things.
Paradigm: means organizing principal of a program.
It is an approach to programming.
Procedurel programming
A program in a procedural language is a list of
instructions where each statement tells the computer to
do something. Here focus is on processing.
Languages support this paradigm by providing facilities
for passing arguments to functions (subprograms) and
returning values from functions.
Modular programming
With the increase in programm size, a single list of
instructions becomes unwieldy Thus a large program is
broken down into smaller units i.e, functions(subprograms).
Module
A set of related procedure with the data they manipulate
is called a module. This is also called data-hiding
principle. It does model the real world very -well.
The object oriented programming
It not only makes the program less complex but also
makes the software reuse feasible and possible.
It views a problem in terms of objects involved rather than
procedure for doing that.
Object
It is an identifiable entity with some characterstics and
behaviour.
While using OOP's approach:*Characterstics of an object are represented by its data.
*Behaviour of an object is represented by its functions
associated.
Class
A class is a template /blue -print representing a group of
objects that share a common proreties and relations.
Basic concepts of OOP's
1.Data Abstruction
2. Data Encapsulation
3. Modularity
4. Inheritance
5. Polymorphism
Data Astraction
It refers to act of representing essential features
without including the background details or
explanations.
Encapsulation
The wrapping up of data and operation /functions
(that operate on the data ) into single unit (called
class) is known as encapsulation.
*Encapsulation is a way to calculate /implement data
abstraction.It hides the details of the
implementation of an object. In C++ encapsulation
is implemented with the help of a class.
Modularity
It means decompose the tasks (the large system
programs) into small correlated modules.
It is implemented with the help of programs.
Inheritance
It is the capacity of one class to inherit(access) from
one class.
Uses of inheritance:
i) Insurance of the closeness with the real worldmethods.
ii) Reusability , derivation of a new class, reduction in
amount of typing and effort.
iii) Translative nature of inheritance.
Polymorphism
It is the ability for a message or data to be processed
in more than one form.
Advantages of OOP's:
a) It models the real world well.
b) With OOP's ,programs are easy to be understood
c) OOP's offers classes reusability .
d) OOP's faciliates quick development as parallel
development of classes is possible.
e) With OOP's ,programs are easier to test ,manage and
maintain.
Disadvantages of OOP's :
a) With OOP's ,classes tend to be overly generalised.
b) The relations among classes becomes artificial at
times.
c) The OOP's program design is tricky.
d) Also one needs to do proper planning and design for
OOP's programming.
e) To program with OOP's ,programmer needs proper
skills such as design skills ,programming skills and
thinking in terms of objects etc.
▒▒▒▒▓▒▒▒▒
✏♫♫✏
Thank you
✏♫♫✏
▒▒▒▒▓▒▒▒▒
Download