Beruflich Dokumente
Kultur Dokumente
Objects
Following figure shows few entities and each of them can be treated as an object. So we can say, an object can be a person, a place, or a thing with which the computer must deal.
Objects Contd...
Every object will have data structures called attributes and behavior called operations. The different notations of an object which uniting both the data and operations, are shown in following figure:
or
or
EXAMPLE
or
or
Classes
The objects with the same data structure (attributes) and behavior (operations) are grouped into a Class. or All those objects possessing similar properties are grouped into the same unit which is called as Class. The concept of class-ing the real world objects is logically shown in the following figure
Person Objects
Classes Cont..
A class is a template (pattern) that unites data and operations. A class is an abstraction of the real world entities with similar properties. A class identifies a set of similar objects. Ideally, the class is an implementation of abstract data type. In C++ or JAVA, related objects displaying the same behavior are grouped and represented by class in the following way:
//member functions
}
JAVA Object Creation Account savings_account = new Account(); Account current_account= new Account(); Account FD_account= new Account();
DEMERITS
Compiler overhead Runtime overhead Re-orientation of software developer to object-oriented thinking Requires the mastery over the following areas:
Software Engineering Programming Methodologies
Thanks
7