Ask a Teacher



WHY ARE OBJECTS SAID TO BE INSTANCES OF A CLASS?

Class is the structure of an object, meaning the definition of all items that an object is made up of. An object is therefore the "result" of a class. In reality, an object is an instance of a class, which is why can use interchange the terms object or instance (or even occurrence).

A class is made up of two parts:

Attributes (often called member data): this is the data that refers to the object's state
Methods (often referred to as member functions): these are functions that can be applied to objects


comments powered by Disqus