March 19, 2024

Class

 

I wrote earlier that it is sometimes difficult to think of objects that do not have a tangible equivalent. However, one concept that is easier to grasp is that of classification, the idea that we can groups things that are similar, possessing similar properties.

OOP uses the concept of class to manufacture objects that are similar. A class is the template for the production of objects. Objects that belong to the same class will have the same attributes and possess the same protocol, which means that objects of the same class will respond to the same set of messages.

Next page » Hierarchy and inheritance

Previous page « Attributes

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Up to top of page