O'Reilly logo

Just Enough C/C++ Programming by Guy W. Lecky-Thompson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Classes

A class is a precise definition of what an abstraction of an object should look like and how it should behave. There is a one-to-many relationship between objects and classes—in other words, many objects can potentially be based on a single class definition. For example, a car might have four wheels in an object diagram, each with its own interactions, but each wheel is based on a single wheel class.

The class needs to define the data that the objects store internally, the messages that they will react to, and the methods that can be used to obtain information from them, or change their internal state in some way.

You would typically create a class diagram that depicts these features in the same way that you create an object diagram ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required