C++ Classes and Objects

C++ classes and objects are the main components of object oriented programming. Classes are user defined that contain methods and attributes. An object is blue print of the class. Class contains the properties of that object. For example, vehicle is a class that contains the definition for all types of vehicles. The types of vehicles … Read more

C++ Inheritance

C++ object oriented programming provides the feature of C++ inheritance using classes. Inheritance is the phenomenon of inheriting some or all members of a class by another class. Members can be variables and functions. Inheritance works between classes. The classes in inheritance are: Base class or Parent class Derived class or Child class The relationship … Read more

C++ Abstraction

C++ Abstraction is one of the most important features of C++ object oriented programming. Abstraction means to hide some features of the code and display only necessary information to user. Data abstraction provides the capability to hide implementation details of the data and show only needed information for user interaction to the outside world. Data … Read more

C++ Polymorphism

C++ Polymorphism is one of the most important feature of Object Oriented Programing OOP. In the word Polymorphism, poly means many and morph means form. Polymorphism means the phenomenon of having many forms. In C++ programming language, C++ polymorphism refers to the phenomenon where there are multiple classes in a code and classes relate to … Read more

C++ Functions Overloading

In C++ Functions Overloading, two or more than two functions can have same name with different number and/or type of parameters. For example, the names of the functions below are same but the number and type of arguments is different. This phenomenon is called function overloading. In the above example, the two functions having the … Read more

C++ Object Oriented Programming

In C++ OOP stands for Object Oriented Programming. As the name suggests, in Object Oriented Programming, a programmer works with objects. Objects are main entities of OOP that contain both data and functions. Contrary to the procedural programming, classes and objects provide an interactive way of programming for user. Procedural programming confines the user to … Read more

C++ Number Guessing Project

//**************************************************************************************************************// // This code has been provided by TutorialsArt.com // Distribution of the code is permitted if and only if you do not delete these lines. //**************************************************************************************************************// #include <iostream> #include <string> // Needed to use strings #include <cstdlib> // Needed to use random numbers #include <ctime> using namespace std; void Drawa_Line_fn(int n, char symbol); void … Read more