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.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *