Learn C++ Classes in Punjabi Language
Computer Gyan
A class is a user defined data type, which holds both the data and functions. The internal data of a class is called member data and the functions are called member functions. The member functions mostly manipulate the internal data of a class. The member data of a class should not normally be addressed outside a member function. The variables of a class are called objects or instances of a class. Structure contains one or more data item, which are grouped together as a single unit. On the other hand class not only contain the data members but also the functions to manipulate that data. Secondly, in a structure, all elements are public by default, while in a class they are private.
Concept of object oriented programming. o Class o Object o Abstraction o Data hiding o Inheritance o Polymorphism
Class :- Class is an abstract data type, used to hold the data as well as the functions to operate on the data. Class is a logical method to organize data and the function in a same structure. Object: - Object is an instance of a class. Which is instantiated to access the members of a class. Inheritance:-The principal here is that each subclass shares a common characteristic with the class from which it has been derived. The original class is called the ‘Base Class’. Other classes can be defined that share the ‘base class’ characteristics these are called’ Derived Classes’. Encapsulation: - It is the concept of hiding the data and to avoid the accidental access to the data. It is done using the keywords private, public and protected. Polymorphism: -Polymorphism allow you to create definitions for operators and functions and at run-time depending on the context a particular definition will be used . Inline function:- When we call function it take time .When the function is very small in such case we use ‘inline’ function.
For more information visit: https://www.geeksforgeeks.org/c-classes-and-objects/ https://www.w3schools.com/cpp/cpp_classes.asp
Music information: I Am a Man Who Will Fight for Your Honor by Chris Zabriskie is licensed under a Creative Commons Attribution license (https://creativecommons.org/licenses/...) Source: http://chriszabriskie.com/honor/ Artist: http://chriszabriskie.com/
ਮੈਂ ਕਿਤੇ ਗਲਤ ਹੋ ਸਕਦਾ ਹਾਂ, ਕਿਰਪਾ ਕਰਕੇ ਟਿੱਪਣੀ ਵਿੱਚ ਮੈਨੂੰ ਸਹੀ ਕਰੋ. ਅਗਲੇ ਵਿਡਿਓ ਵਿੱਚ ਮੈਂ ਇਸ ਗ਼ਲਤੀ ਨੂੰ ਠੀਕ ਕਰ ਦਿਆਂਗਾ. ... https://www.youtube.com/watch?v=C-lnsxFLOHY
75978555 Bytes