The class keyboard so you can replace destruct keyboard within the class keyboard.
So which the class members private by default.
So aside from default access controls classes declared with this struct and class, keywords are the
same.
So for example, you could declare my date and time just a class here.
As you can see here.
We just need to arrange these methods here.
So then here, as you can see here, let's make this like that.
And here we will make this functions public.
And as you can see here, we can run our code without any problem here.
So which way you declare class is a matter of style.
So there's absolutely no difference between between struct and class.
Aside from the access controls.
So there are.
They are almost same.
And they are.
They're like absolutely the same, but they have like different there are different things differentiating
on access controls.
So I prefer using struct sometimes, sometimes class.
So and you may like use struct because having the public members list at first.
So but you will see all kinds of conversions out in the programming life.
So cultivate style and stick to it.
So now I want to.
Having encapsulated we have encapsulated the year, as you can see here, we have get here and adhere.
So you must now use methods to interact with this.
The my date and time.
So here I want to.
Set for something here.
So.
Let's delete this code and create New Year.
My date and time and clock.
Here if here is not.
Operator Ternary.
Operator clock that set year.
2018.
Here.
And clock that set here doesn't 19.
And then I will explain all of these codes here that appear here and print this year.
Here is the.
And clock that get here.
That's not in our code.
As you can see, we got the output of two 2020 here.
So firstly, we declare the clock here and attempt to set its year to 2018.
So.
This file fails because 2018 is less than 2019, as you can see here.
We will.
As you remember in previous lectures, we will return false from if our set year value parameter had
less than 2019.
So in this case, this statement the here returned true because we have the ternary operator here.
So if you have this operator, we just change true to false.
If it's false to true, so and then you increment here, as you can see here, you increment clock to
add ever by one with this function and.
You increment once and you get the gate here and here.
This the output of it here.