Classes and Objects

Learn about classes and member variables in object-oriented programming.

We'll cover the following

Classes and objects

In object-oriented programming, a class is like a blueprint, or description, of something. Let’s take the concept of a person as an example. How can we describe a person? We can start to make a list of things that apply to all people. A person has the following attributes:

  • Name
  • Age
  • Sex
  • Height
  • Weight
  • Hair color
  • Eye color
  • Shoe size
  • Nationality
  • Address
  • Telephone number

Get hands-on with 1400+ tech skills courses.