Classes of Objects

A class is a formal description and template for a type of object and defines its fields, properties and methods.

In general, there are two types of classes:  non-global and global.  A non-global class does not hold any data and relies upon its objects for data storage.  Each object for a given class will have the same types of members but will contain an independent set of values for each member.  For example, a typical robot application will have multiple Location Objects.  Each Location will store the data that describes a specific part or robot position.  However, all of the Location Objects will be derived from the same Location Class and will have the same types of members.

A global class is like a non-global class in that it defines all of the fields, properties and methods associated with this class. However, a global class is used when a single set or no set of data exists, so that a global class never has any objects. For example, many of the arithmetic functions (e.g. sine, cosine, square root) are part of the Math Class . This is done as a convenience to allow these functions to be grouped together and therefore easily accessed. However, the Math Class has no fields, no properties and no data, just methods. Consequently, the global Math Class has no objects.