Sample classes
- Last Updated: January 16, 2024
- 1 minute read
- OpenEdge
- Version 12.8
- Documentation
The class-based sample application consists of several class definition files and a procedure file. These files define several classes, an interface, and a procedure that drives the class-based application. The following is a description of the relationships among the classes, interface, and procedure, using unqualified names for the application classes and interface for readability:
|
The descriptions and code listings for these files follow.
This is the top-level user-defined abstract super class that provides a common method and variable for storing time-tracking information. It also provides abstract definitions for a class event and event publishing method, and for a message handler method, all to be implemented by classes that inherit from it:
CommonObj.cls
|
This interface is
implemented by the following class, acme.myObjs.CustObj:
|
This class extends
acme.myObjs.Common.CommonObj to provide general
functionality for handling customers and is a super class for the acme.myObjs.NECustObj class, which handles New England
customers:
|
This class extends
acme.myObjs.CustObj to handle New England customers by
overriding GetCustomerName( ) to return the customer’s
E-mail address along with their name:
|
This class provides various support methods for other classes:
HelperClass.cls
|
This class provides a method for notification of customers who have exceeded their credit limit:
CreditObj.cls
|
This class
provides a common mechanism together with the MessageHandler( ) method in acme.myObjs.Common.CommonObj for other classes to store and report error
information:
|
This is the class that initializes the environment for running all the other sample classes:
Main.cls
|
This is the
procedure that instantiates the sample classes to run with two different sets of sample
data, depending on the constructor used to instantiate Main:
|