Introduction to Object Oriented Programming OOP in C++

Published: 22 March 2023
on channel: BJM Technologies
9
2

C++ What is OOP?
OOP stands for Object-Oriented Programming.

Procedural programming is about writing procedures or functions that perform operations on the data, while object-oriented programming is about creating objects that contain both data and functions.

Object-oriented programming has several advantages over procedural programming:

OOP is faster and easier to execute
OOP provides a clear structure for the programs
OOP helps to keep the C++ code DRY "Don't Repeat Yourself", and makes the code easier to maintain, modify and debug
OOP makes it possible to create full reusable applications with less code and shorter development time
Tip: The "Don't Repeat Yourself" (DRY) principle is about reducing the repetition of code. You should extract out the codes that are common for the application, and place them at a single place and reuse them instead of repeating it.

C++ What are Classes and Objects?
Classes and objects are the two main aspects of object-oriented programming.

Look at the following illustration to see the difference between class and objects:

class
Fruit

objects
Apple

Banana

Mango

Another example:

class
Car

objects
Volvo

Audi

Toyota

So, a class is a template for objects, and an object is an instance of a class.


Watch video Introduction to Object Oriented Programming OOP in C++ online without registration, duration hours minute second in high quality. This video was added by user BJM Technologies 22 March 2023, don't forget to share it with your friends and acquaintances, it has been viewed on our site once and liked it people.