So far, the lessons in this tutorial have focused on presenting the basic
syntax of C++.
You've learned how to
control the flow of execution with
some basic ways to
handle input and output and about
This lesson introduces
use of objects in C++ defines
the way programs are designed and written. Classes are a software construct that can be used to emulate a real world object.
data and abilities. For instance, a software model of a car, a car "class", might contain data about
the type of car and abilities such as accelerate or decelerate. A class is a programmer defined data type that has data, its members,
and abilities, its methods. An object is a particular
instance of a class.
This is best understood by an analogy with a built in
data type such as int.
Declares x to be a variable of type int.
Declares impala to be an object of class Car.
The concepts introduced in this lesson will be revisited and
explained in detail in later lessons.