skip to main content

Object-oriented Programming : Parameterized classes

Parameterized classes
A parameterized class is a skeleton class definition that when passed the appropriate parameters will create a new class tailored to perform a given function. Parameterized classes allow developers to create classes that have common behavior. For example, a single parameterized collection class can be used to define many types of collection classes.
CLASS-ID. AccountCollection INHERITS Base USING X.
ENVIRONMENT DIVISION.
CONFIGURATION SECTION.
CLASS Base
CLASS X.
ENVIRONMENT DIVISION.
CONFIGURATION SECTION.
CLASS CheckingAccountCollection EXPANDS AccountCollection USING CheckingAccount.
DATA DIVISION.
01 a-checking-account-collection USAGE OBJECT REFERENCE CheckingAccountCollection.

Copyright (c) 2017 Veryant
Contact us
Please share your comments on this manual or on any
Veryant product documentation with the email button at the top left