How is encapsulation achieved in Object-Oriented COBOL?

  • By bundling data and methods within a class
  • By separating data and procedures
  • Through external subroutine calls
  • Through the use of global variables
Encapsulation in Object-Oriented COBOL is achieved by bundling data and methods within a class. This means that the internal details of the class, such as data structures and implementation details, are hidden from the outside world, promoting information hiding and reducing complexity.
Add your answer
Loading...

Leave a comment

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