Objects and Classes
Objects and Classes IMPORTANT QUETIONS FOR EXAM (GTU,CVM,SP) CHAPTER ONE COMPLETE HERE IS YOUR CVMU SYLLABUS - LINK BLOG BY JAY SHAH( GMAIL ) Explain basic concept of class. A class is a template that specifies the attributes and behavior of things or objects. A class is a blueprint or prototype from which objects are created. A class is the implementation of an abstract data type (ADT). It defines attributes and methods. Object declaration: In following example class employee is created and ‘a’ is object of this class. class item { // data members and member functions }a; In above syntax class name is item, and a is object of that class Object declaration can be also done in main() function as follows: int main() { item a; } Accessing class member: Private members of the class can only accessed by the members with in that class. Public members of the class can be accessed outside the class also. For accessing class member outside class can be done by using do...