Lecture-3-Objects and Classes Concept
Lecture-3-Objects and Classes Concept
class class_name
Body of Class {
……..
Data member + Method
……..
};
Classes in C++
Access specifier
Reflects the access level of the members of the class
private: (It is default)
Usually the data members of a class are declared as private
public:
The member functions are declared as public
private members / methods
}
Classes and Objects
An object is said to be an instance of a class
The name of the destructor is the same as the name of the class,
Thank you
Reference
•Lafore, R. ( 2002) Object-Oriented Programming in
C++,4th Ed. SAMS, USA
•Farrell, J. (2009) Object-Oriented Programming Using
C++, 4th Edition, Course Technology, USA.
•Schildt, H. (2003) C++: The Complete Reference, 4th Ed.
McGraw-Hill, USA