by Dinesh Thakur Category: Classes in C++

Storage Classes are used to determine in which space the value of variable will Stored. And what will be the value of variable, when we doesn’t Specify the value of variable. And In what Place we can use the value of variable. The Storage Classes Determines the Following things.

 
by Dinesh Thakur Category: Classes in C++

1) Constructor is used for Initializing the values to the data members of the Class.
2) Constructor is that whose name is same as name of class.
3) Constructor gets Automatically called when an object of class is created.
4) Constructors never have a Return Type even void.
5) Constructor are of Default , Parameterized and Copy Constructors.

 
by Dinesh Thakur Category: Classes in C++

Access Modifiers :- These are also Called as Access Visibility Controls  means they defined where a method and Data Member of class will be used either inside a  class ,outside a class ,in inherited class or in main Method They Tells us the Scope of Methods where they would be used Various types of Access Modifiers  are as follows:-

 
by Dinesh Thakur Category: Classes in C++

Object Oriented Programming has a special feature called data abstraction. Data abstraction allows ignoring the details of how a data type is represented. While defining a class, both member data and member functions are described. However while using an object (that is an instance of a class) the built in data types and the members in the class are ignored. This is known as data abstraction. This can be seen from the above example.



 
by Dinesh Thakur Category: Classes in C++

Encapsulation is the technique of binding or keeping together the data and the functions (that operate on them) in a single unit called a class. Encapsulation is the way to implement data abstraction. A well-encapsulated object acts as a 'black box' for other parts of the program. That is, it provides services to the external functions or other objects that interact with it. However, these external functions or the objects do not need to know its internal details. For example, the data p_code, p_name, p_price and qty_in_hand and the functions display-product() and check_qty are encapsulated in a class Product.

 

Page 18 of 18



About Dinesh Thakur

Dinesh ThakurDinesh Thakur holds an B.SC (Computer Science), MCSE, MCDBA, CCNA, CCNP, A+, SCJP certifications. Dinesh authors the hugely popular blog. Where he writes how-to guides around Computer fundamental , computer software, Computer programming, and web apps. For any type of query or something that you think is missing, please feel free to Contact us.