Classes and objects
Chapter 3: 11th Computer Science · Computer Science · EN medium
From your actual textbook ✓
What does your textbook say about Classes and objects?
Classes and objects . . Declaration of a class A class is defined in C++ using the keyword class followed by the name of the class. The body of the class is defined inside the curly brackets and terminated either by a semicolon or a list of declarations at the end. Note The only difference between structure and class is the members of structure are by default public where as it is private in class .
📖 Namma Kalvi 11th Computer Science Textbook English Medium · Page 239
Read from the source
Complete lesson
Classes and objects . . Declaration of a class A class is defined in C++ using the keyword class followed by the name of the class. The body of the class is defined inside the curly brackets and terminated either by a semicolon or a list of declarations at the end.
Note The only difference between structure and class is the members of structure are by default public where as it is private in class . class class-name private: variable declaration; function declaration; protected: variable declaration; function declaration; public: variable declaration; function declaration; }; The General Form of a class definition • The class body contains the declaration of its members (Data member and Member functions).
Related topics
Want this shaped for your exam marks?
Get an AI answer grounded in your actual textbook — with the exact page reference.
Ask AI about this topic →