A Classic Language Gets Classier

Object-oriented extensions have been added to traditional Rexx without changing its existing functions and instructions. So you can continue to use Rexx's procedural instructions, and incorporate objects as you become more comfortable with the technology. In general, your current Rexx programs will work without change.

In object-oriented technology, objects are used in programs to model the real world. Similar objects are grouped into classes, and the classes themselves are arranged in hierarchies.

As an object-oriented programmer, you solve problems by identifying and classifying objects related to the problem. Then you determine what actions or behaviors are required of those objects. Finally, you write the instructions to generate the classes, create the objects, and implement the actions. Your main program consists of instructions that send messages to objects.

A billing application, for example, might have an Invoice class and a Receipt class. These two classes might be members of a Forms class. Individual invoices are instances of the Invoice class.


Objects in a Billing Application

Each instance contains all the data associated with it (such as customer name or descriptions and prices of items purchased). To get at the data, you write instructions that send messages to the objects. These messages activate coded actions called methods. For an invoice object, you might need CREATE, DISPLAY, PRINT, UPDATE, and ERASE methods.