What is the purpose of a class in Object-Oriented COBOL?
- To control program execution
- To define a template for creating objects with shared attributes and behaviors
- To define the size and type of data
- To optimize memory usage
In Object-Oriented COBOL, a class serves as a blueprint for creating objects. It defines attributes (data) and behaviors (methods) that the objects instantiated from the class will share. This facilitates code organization and reusability.
Loading...
Related Quiz
- When a data item is defined with the OCCURS clause and a DEPENDING ON phrase, the actual number of occurrences is determined at ____________.
- In COBOL, the indexed file's key is often used to perform _____ operations on records.
- The _____ clause in COBOL allows you to declare a variable as a subordinate item of another variable.
- What is the key difference between the REDEFINES clause and the RENAMES clause in COBOL?
- What is the difference between "ON SIZE ERROR" and "AT SIZE ERROR" in error handling?