Unit-3 Access Specifiers OOPs using C++ | BCA 2nd Year 2023
Unit-3 Access Specifiers OOPs using C++ | BCA 2nd Year 2023

Unit-3 Access Specifiers OOPs using C++ | BCA 2nd Year 2023

Unit-3 Access Specifiers OOPs using C++ | BCA 2nd Year 2023-Hello everyone welcome to the pencilchampions.com website this website provide unit 3 object oriented Programming notes In BCA Student Year 2023.  Thankyou for visiting pencilchampions.com

Unit-3 Access Specifiers OOPs using C++ | BCA 2nd Year 2023
Unit-3 Access Specifiers OOPs using C++ | BCA 2nd Year 2023

Access Specifiers

There are 3 types of access specifiers

Multilevel Inheritance

  • In multilevel inheritance, a class inherits the properties of another derived class.
  • In the figure below, Class B and Class A are as parent classes based on retention relationship. The level of inheritance extended to any level. It is possible

Hierarchical Inheritance

  • In this type of inheritance more than one subclass inherits from the same base class. More than one derived class inherits from the same base class.

Polymorphism

  • Polymorphism is the ability to use an operator or method in different ways. Polymorphism gives different meanings or functions to operators or methods.

There are two types of polymorphism

  • Types of Compile Time Polymorphism
  • Run Time Polymorphism

Compile time polymorphism

  • Function overloading
  • Operator overloading
  • Run time polymorphism- function overriding/virtual functions.

Function overloading

  • Function overloading refers to using the same thing for different purposes. This process of having “same name but different in signature” functions is called function overlanding.
  • From the point of view of the type of argument. In the thirteenth of the number of arguments.

Function Overriding

  • If the derived class function name is same as the base class member function with same arguments then it is called overriding. as a function

Operator overloading

  • C++ also provides option to overload operators.
  • For example- we can create string class with operator’+’ to concatenate two strings. We know that it is addition operator whose function is to add the operands between integer operands when adding them with single operator and to add them when placing them between string operands.

 


Discover more from Pencil Champions

Subscribe to get the latest posts sent to your email.

By Atul Kakran

My name is Atul Kumar. I am currently in the second year of BCA (Bachelor of Computer Applications). I have experience and knowledge in various computer applications such as WordPress, Microsoft Word, Microsoft Excel, PowerPoint, CorelDRAW, Photoshop, and creating GIFs.

Leave a Reply

Discover more from Pencil Champions

Subscribe now to keep reading and get access to the full archive.

Continue reading