|
|
 |
|
OBJECT ORIENTED PROGRAMMING THROUGH JAVA
|
 |
|
UNIT
1
IMPORTANT POINTS:
*INTRODUCTION TO OOPS CONCEPTS:
All
oops languages, including C++, share three common defining trails
ENCAPSULATION
POLYMORPHISM
INHERITANCE
ENCAPSULATION:
It is the data binds together code and the data it manipulates and keeps them safe from outside interference and misuse.
When data and code are linked together in this fashion, an object is created. In other words an object is the device that
supports encapsulation.
POLYMORPHISM:
The name itself suggests that “POLY” stands for many and “MORPHISM” stands for forms. Polymorphism
is the quality that allows one name to be used for two or more related but technically different purposes. In general giving
multiple interfaces to a function or an operator is called “POLYMORPHISM”.
INHERITANCE:
Inheritance is the process by which one
object can acquire the properties of another. The best example for this is C,C++, and JAVA languages itself. Java is being
derived from C++ which in return is being derived from C from where it inherits all the capabilities of C,C++ and also add
the features of its own.
|
 |
|
|
|
 |
|
OBJECT-ORIENTED DEVELOPMENT IN JAVA:
Java
is unusual for an oop’s language in that it is “objects all the way down”. Unlike C,C++, which is a confusing
combination of objects and functions, everything in java is an object. Strings are objects, numbers are objects, threads are
objects, even applets are objects. Because of this, java has all the helpful features of object-oriented systems just described.
It’s core constructs of classes, objects, methods, and instance variables are, by there very nature, managed in a modular
fashion. Java’s support for inheritance allows you to build new classes from other classes. Each class you construct
becomes a tool that can be used to create yet more complex classes.
It
has runtime garbage collector that removes objects from memory that you no longer need. No longer will your program run out
of memory because you forget to explicitly delete an object. The garbage collector, which your program doesn’t even
have to be aware of, does this for you. Furthermore, java’s total orientation toward objects removes another construct
that has been a blight of programmers-the pointer. Because of this combination of garbage collection and removal of the pointer
construct, java has generally taken the problem of memory management away from you.
next
|
 |
|
|
|
|
|
designed by---Amarnath,Gowrishankar,Arundeep,Keerthana,Thanuja,Khajaasad.
AL HABEEB COLLEGE OF ENGINEERING AND TECHNOLOGY COMPUTER SCIENCE DEPARTMENT
|
|
|
 |