CS 70

C++'s Class-Related Terminology

  • Duck speaking

    I know Java, so I think I've got the terminology down.

  • LHS Cow speaking

    Actually, C++ uses different words from the ones commonly used in Java.

  • RHS Cow speaking

    For a variety of reasons (including the same concepts being invented multiple times in different parts of the world), different programming languages use different words to describe the same concepts.

Here's a mapping from Java and Python terminology to the C++ equivalent.

Java/Python Terminology C++ Terminology
class class or struct
object or instance object of class type or instance of class X
instantiation construction
field or instance variable member variable or data member
method member function
superclass base class
subclass derived class

(When logged in, completion status appears here.)