Hi, everybody, welcome.
Today, we're getting started with one of the most important topics of the course, which will be one
of the most challenging as well, and that is object oriented programming.
Or Olby, in short, basically, we are going to apply all of our rules regarding variables, regarding
collections, regarding methods, and we're going to build up some more topics on top of that, such
as classes such as properties.
And also we're going to go deeper into the methods topic.
I think that this section is very important for everyone who wants to find a job as a programmer, because
object oriented programming is very important for you to pass interviews or to build any program which
is complex.
We'll start off with basic three basic terms.
I'm going to show you right away an example of visual example of how objects are built.
And then we're going to start from the beginning and explain each term, as we always do.
And the example that you will see in this lecture will start building it from the start from the next
lecture.
All right.
So this is an introduction of video.
And from the next lecture, we will start building it up from scratch.
So.
All right, let's begin.
All right, then.
So this will be the introduction of video.
So let's start off explaining what is object oriented programming actually means.
OK, so Python is an object oriented programming language.
This we already know and it gives us unique abilities for flexible and useable code.
OK, so let's see some introduction visualization in order to understand what is object oriented programming,
we'll talk in general terms without getting into details.
And later on, after we explain each of these terms deeply, we will build up this example from scratch.
OK, so first of all, there is a new entity we're going to study, which is called the class.
And that class wraps are methods which we already know, an additional entity, which is called properties.
OK, so methods already familiar with methods, but properties are like a variable off that object.
OK, we will later on go into details.
Just remember that properties state for variables.
OK, these are the variables of the object.
So this is an introductory, introductory, introductory visualization.
So a class basically is in reference to cause it's a general car sketch.
OK.
Our car our car has methods which is which are methods as we know them.
For example, we have fuel calculator, we have check engine counters, we have door is open method.
And all of these are methods.
We can put calculations in them, math calculations or some other like manipulations upon variables
that we want.
All right.
So methods are methods as always, while properties are a variable off that object.
OK, so in properties we might have fuel status current km kilometers on engine or door status.
All right.
So this is a general car search, meaning each car that we want to produce from our factory will have
all of these parameters in the in the car while it's being made.
OK.
And from here, let's scroll down a little bit.
OK.
So from this basic sketch, we can now create a new instance of an object, OK, instance of an object
for a specific car model.
While here we had general car sketch.
Now from this we can create a specific car model using an instance of an object.
We will obviously going to learn how to do it.
You're not supposed to know.
OK, and also we can you reuse methods endlessly for each car model.
OK, so from this we're going to create several cars and each car would have all of these properties
and methods, each one of them with its own properties and methods.
OK, so for example, here we have first object.
For instance, from the car sketch that we have seen here, OK, we want to create an object instance.
OK, so from the sketch, we want to create an actual car, basically.
So this time we have actual variables here, which are the properties, OK?
Remember that properties are the same as variables.
Later on, we'll show exactly what they are.
So this Ford Focus Focus car has fuel status then current kimmet kilometers on engine are 240 and Dorje
status is closed.
OK, these are the variables that this car contains.
All right.
And at the bottom, we have the methods and fuel calculator.
We have some kind of printout.
You still have 10 liters of fuel, OK, after some calculation made there.
We have we have a printout inside that method and we have a printout that says you still have 10 liters
of fuel.
Check engine also have some calculation.
And at the end we have a printout.
You need engine check in one thousand and 50 kilometers and there is open the same.
All doors are closed.
OK, there are some check up in here.
Inside this method we check which checks if all doors are closed.
OK, basically, for example, door is open.
Check can receive the variable off the property of door state status.
OK, so it can receive it and check what value it has here, this variable and accordingly then to print
out whatever we want.
OK, so these are the basics.
And from the other hand, we have a second object instance, an Audi A3 and this time Fuel Staros is
15 as opposed to here we had 10.
OK, the values are different.
So fuel status is twenty five current km on three hundred and ten dollars status is open.
And this time the fuel calculation, the method, this method, the calculation here was different and
it says you still have 25 liters of fuel.
Engine check, you need engine checking, eight more kilometers and the door is open chag.
Not all doors are closed.
OK, so we have basically this sketch here.
This is a sketch.
It has certain methods and certain properties.
OK, and then each car gets its own properties and its own values of properties right here.
And we can make separate calculations for the methods as well for each car model.
OK, so this is basically the main idea off objects.
OK, the class that you were going to learn straightaway in the next lecture is like a sketch.
And from that sketch, from that class, we can create an instance of an object, meaning we can create
actual cars in our case and give its own properties and give its own values of properties here and use
this these methods accordingly.
For each of these cars.
We're actually going to give this instance, this entity.
We're going to give it actually a name, a Ford Focus.
And inside this Ford Focus, we're going to insert some values inside.
OK, this is as much visualized as I can do it.
And don't worry, we're going to start all this from scratch.
From the next lecture, we'll learn what our classes, what our methods in the terms of object oriented
and also what our properties are.
I think that concludes our introduction video.
And I will see you in the next lecture.
Thank you.