So let's start with the next section.
We are going to talk about classes in C++, so it is the most important feature, which C++ provides
all classes.
So let's see what is actually a class and what is kind of Real-World exam where we can take to understand
the concept of classes and objects in C++?
So everything in C++, every module we create, every function we create in C++ programming language
can be associated with the class or kind of create objects.
So it have a lot of attributes and methods and example like this is a small example I am specifying
in the slide.
Like, we have a car that is an object and the car has different characteristics, right?
So those characteristics are all attributes and it can be made color and Italian methods.
Methods means the functions which the car can perform, such as drive and break, the function to which
the car can perform.
All the modules inside the car can perform in both scenarios.
They are called methods or functions.
So C++ class also have an entity like it's an entity.
It have its own attributes, attributes, main characteristics and also methods.
And class is a user defined data type, so this example seems to be way.
So I wanted to include one more slide into this, and I want to show you that, which is a kind of a
real world example how you can relate glass and objects.
So let's go to the next slide.
So if you see dog.
Dog, is it class of animals, right?
There are different types of dog, so we cannot see like dog as they object because dog is like not
a genetic thing in case of object objects are not genetic.
Objects are instances of plus.
OK.
So in case of a class dog is a specific class of animals and dog, that class of animals have different
characteristics.
So each dog have different breed, different color, different age, gender and honor.
So these are the attributes or characteristics of the class.
Dog and each dog have different functions.
They can do these things right.
They can eat.
They can sleep, they can run, they can sit, and they can talk to these other functions they can perform.
So dog is a genuine class.
So how can we create objects of dog?
So each objects up dog will be different dogs and they have different characteristics.
So this is an object of dog.
This is these all three are dogs, but this is a specific object of their dog.
OK, so this is having a breed of American Eskimo that is this breed and its color is why it is aged
six years.
It then that is being made.
Its owner is Jewish.
So these are some examples of like white objects.
So what we have as a genetic thing that will be a class, and if we create a more specific object or
more specific instance of that particular class, then it is called an object.
So if you can share a dog, I say class, these three dogs are objects of this class dog, OK?
So these three dogs, mainly American Eskimo, French Bulldog and model are examples of the objects
of this class.
Know what we have understood.
So if we want to create something in general, we create a class and we respect all the associated variables.
OK?
All the associated members of the class and all associated functions of the class in that particular
class.
That's how we create class.
Now let's see how we create a class in C++.
So this is the syntax explanation.
So if we want to create a class named great class in C++, you just need to create your secured card
class, followed by your last name.
Then you have to open the curly braces.
You have to list out back to specify.
So you have it.
What is access press event?
We will move into that school and you will list out all the functions and variables associated with
that particular class.
Then you close the curly braces and semicolon.
That's how you create a class in C++.
Now we can create an object of the class like I have X.
I have shown at the dog is a class and American Eskimo is an object of that particular class.
It's also a dog, but it's more specific, right?
So an object is a specific instance of a class and how you can create an object.
After you create that class, you will put the class namespace object.
That's how you create that object in C++.
Now, let's move to a quick demo on this section so that you will get more understanding on this.
So let me go to Visual Studio Code.
We are missing our terminal.
Let me open the terminal for you so you can see here.
This is an example of this class in C++.
Here I have created a class named Goch.