Home | | Computer Science 11th std | C++ Classes and objects: Points to Remember

Chapter: 11th Computer Science : Chapter 14 : Classes and objects

C++ Classes and objects: Points to Remember

Computer Science : Classes and objects

Points to Remember:

 

A class binds data and associated functions together.

 

A class in C++ makes a user defined data type using which objects of this type can be created.

 

While declaring a class data members , member functions ,access specifiers and class tag name are given.

 

The member functions of a class can either be defined within the class (inline) definition or outside the class definition.

 

The public members of the class can be accessed outside the class directly by using object of this class type.

 

A class binds data and associated functions together.

 

A class in C++ makes a user defined data type using which objects of this type can be created.

 

While declaring a class data members , member functions, access specifiers and class tag name are given.

 

The member functions of a class can either be defined within the class (inline) definition or outside the class definition.

 

The public members of the class can be accessed outside the class directly by using object of this class type.

 

A class supports OOP features ENCAPSULATION by binding data and functionsassociated together.

 

A class supports Data hiding by hiding the information from the outside world through private and protected members.

 

When a member function is called by another member function of the same class , it is calledas nesting of member functions.

 

The scope resolution operator (::), when used with the class name depicts that the members belong to that class as in class_ name :: function_name and only used with the variable name as in :: s variable –name , depicts the global variable.(the one with file scope ).

 

When an instance of a class comes into scope, a special function called the constructor gets executed.

 

The constructor function allocates memory and initializes the class object.

 

When an instance of a class comes into scope, a special function called the constructor gets executed.

 

The constructor function allocates memory and initializes the class object.

 

When a class object goes out of scope, a special function called the destructor gets executed.

 

The constructor function name and the destructor have the same name as the classtag.

 

A constructor without parameters is called as default constructor.

 

A constructor with default argument is equivalent to a default constructor

 

Both the constructors and destructor return nothing. They are not associated with any data type.

 

Objects can be initialized dynamically .

 

Study Material, Lecturing Notes, Assignment, Reference, Wiki description explanation, brief detail
11th Computer Science : Chapter 14 : Classes and objects : C++ Classes and objects: Points to Remember |

Related Topics

11th Computer Science : Chapter 14 : Classes and objects


Privacy Policy, Terms and Conditions, DMCA Policy and Compliant

Copyright © 2018-2024 BrainKart.com; All Rights Reserved. Developed by Therithal info, Chennai.