A friend class can access the protected and private components of another class. This is useful when you want to allow controlled access to internal details of a class without making them public. CLASS main_class DEFINITION. PUBLIC SECTION. METHODS: display. PRIVATE ...