C++ is an object-oriented programming 
language. So, what does this mean, object- 
oriented?
It refers to the object-oriented paradigm, meaning 
the method by which we can create objects of 
different types.
But not just different, but user defined types.
Up to this point you've been using basic, primitive 
types in C++. The ints, floats, bools and etc. But 
you've found that they have their limitations.
You can't describe adequately an entity in real life 
like a table or a chair or a certain kind of animal, a 
cat or building or whatever
using just those types. It's not enough. And you 
might have thought, "It'd be really nice if I'm going 
to model a kennel, if I could declare a dog object."
But there are no dog objects or types in C++, but 
now you can build such a thing.
The object-oriented paradigm allows you to 
create your own types in C++ and you're going to 
do that with
something called a class. And you've seen 
structs already
in these lessons and a class is very much like a 
struct. So here's the concept. The idea is to 
bundle together different data types
into one type. But, not only data types, the 
functionality that is going to define how these 
objects
are going to interact with each other and interface 
with other entities. We call this
encapsulation. Our basic building block is called 
the class and of course, your keywords are 
class,
public and private. So, if you look at this syntax 
you'll see that it's very much like a struct.
If fact, if you were to get rid of the public and 
private and replace the keyword class with struct, 
it would be exactly the same.
You are indeed defining in new class of objects in 
your language. The two different sections in
a class, the public and private, what goes where? 
The private section of the class defines an area 
that cannot be directly accessed
from outside of the class. That is to say the 
members in the private section
can't be called or accessed or changed or 
manipulated from any entity
outside of the class itself, like from another 
function, perhaps main. So, we're going to place 
our data members there. The member
variable are going to be in the private section of 
the class. That's where they are protected from 
inadvertent change or change that we do not
allow. That change is only going to come from the 
functions that are in the public section of class. 
So, the functions in the public section
are going to dictate how the object's state can be 
changed.
They're going to be the public interface. Now, it is 
the case that data can go in public and private.
Functions can go in public and private. However, 
it only makes sense to put data in the private 
section
that's the purpose of a class. Does it make only 
good sense to put functions into the public 
section of the class? No, it's not the case.
Quite often you have functions not only in the 
public but also in the private. But, the functions in 
the private section again can only be accessed
by the functions in the public section. I like to call 
the functions down in the private section as being 
helper functions.
For instance, you might have a public function 
that does a lot of stuff and you'll want to break it 
down into smaller tasks. You can put some of
those smaller tasks in the private section where 
they wouldn't normally be called by anybody 
outside of the class.
Let's take a look at your very first class.
Throughout this part of the semester we're going 
to work with a particular class as an example.
It's the class for fractions. You cannot declare a 
fraction in C++, there's no such thing.
Well we're going to build a class of objects we 
name "Fraction" so that you can indeed declare 
fractions now and work with fractions. So,
again we have our class and the name of the type 
which is "Fraction". Now, I want to give you this 
caveat at this point. The fraction class that
I'm going to build over the next several lessons is 
not a fraction class that I personally would build if 
I was going to use it. The functions
that I'm going to use to demonstrate classes in 
this particular example I've put in here not 
because
I think it would really be good for fraction class, 
but because they demonstrate the principles that 
I'm trying to show you.
