Writing object-oriented programs

When you write an object-oriented (OO) program, you have to determine what classes you need and the methods and data that the classes need to do their work.

About this task

OO programs are based on objects (entities that encapsulate state and behavior) and their classes, methods, and data. A class is a template that defines the state and the capabilities of an object. Usually a program creates and works with multiple object instances (or simply, instances) of a class, that is, multiple objects that are members of that class. The state of each instance is stored in data known as instance data, and the capabilities of each instance are called instance methods. A class can define data that is shared by all instances of the class, known as factory or static data, and methods that are supported independently of any object instance, known as factory or static methods.

Using COBOL for AIX, you can:

In COBOL for AIX programs, you can call the services provided by the Java Native Interface (JNI) to obtain Java-oriented capabilities in addition to the basic OO capabilities available directly in the COBOL language.

In COBOL for AIX classes, you can code CALL statements to interface with procedural COBOL programs. Thus COBOL class definition syntax can be especially useful for writing wrapper classes for procedural COBOL logic, enabling existing COBOL code to be accessed from Java.

Java code can create instances of COBOL classes, invoke methods of these classes, and can extend COBOL classes.

Restrictions:

Example: accounts

related concepts  
JDK support  

related references  
The Java Language Specification