Objects
An object represents a unique instance of a data structure defined by the template provided by its class. Each object has its own values for the variables belonging to its class and responds to methods defined by that class. This is the same for classes provided by PeopleSoft and for classes you create yourself.
After an object has been created (instantiated) from a class, you can change its properties. A property is an attribute of an object. Properties define:
-
Object characteristics, such as name or value.
-
The state of an object, such as deleted or changed.
Some properties are read-only and cannot be set, such as Name or Author. Other properties can be set, such as Value or Label.
Objects are different from other data structures. They include code (in the form of methods), not just static data. A method is a procedure or routine, associated with one or more classes, that acts on an object.
An analogy to illustrate the difference between an object and its class is the difference between a car and the blue Citroen with license plate number TS5800B. A class is a general category, while the object is a specific instance of that class. Each car comes with standard characteristics, such as four wheels, an engine, or brakes, that define the class and are the template from which the individual car is created. You can change the properties of an individual car by personalizing it with bumper stickers or racing stripes, which is like changing the Name or Visible property of an object. The model and date that the car is created are similar to read-only properties because you cannot alter them. A tune-up acts on the individual car and changes its behavior, much as a method acts on an object.