Please change this code into an oop style using inheritance and polymorphismus. Your not allowed to use interfaces! Please follow modern standards.
*&---------------------------------------------------------------------*
*& Report ZCA_ST_PM01
*&---------------------------------------------------------------------*
*&
*&---------------------------------------------------------------------*
REPORT zca_st_pm01.

TYPES: BEGIN OF uml_relation,
         from_class TYPE string,
         rel_type   TYPE string,
         to_class   TYPE string,
       END OF uml_relation.

DATA: lt_relations TYPE STANDARD TABLE OF uml_relation,
      ls_relation TYPE uml_relation.

CONSTANTS:
  c_vis_package   TYPE char01 VALUE 'I',
  c_vis_private   TYPE char01 VALUE 'P',
  c_vis_protected TYPE char01 VALUE 'O',
  c_vis_public    TYPE char01 VALUE 'U'.

PARAMETERS:
  p_obj TYPE seoclsname, " Object name (Class/Interface)
  p_pkg TYPE devclass.   " Package name

" Configuration parameters
PARAMETERS:
  p_inc1 AS CHECKBOX DEFAULT abap_true USER-COMMAND config, " Include data types
  p_inc2 AS CHECKBOX DEFAULT abap_true USER-COMMAND config, " Include method parameters
  p_inc3 AS CHECKBOX DEFAULT abap_true USER-COMMAND config, " Include attributes
  p_inc4 AS CHECKBOX DEFAULT abap_true USER-COMMAND config.  " Include methods

" Ensure at least one parameter is provided

AT SELECTION-SCREEN.
  IF p_obj IS INITIAL AND p_pkg IS INITIAL.
    MESSAGE 'Please specify either an object name or a package name.' TYPE 'E'.
  ENDIF.

  " Data declarations
  DATA: lo_uml_scanner TYPE REF TO cl_uml_class_scanner,
        lv_puml_text   TYPE string.

  " Create an instance of the UML Class Scanner
  CREATE OBJECT lo_uml_scanner.

  " Set up scanner configuration
  lo_uml_scanner->set_scanner_configuration(
    EXPORTING
      scan_local_types       = abap_true
      add_structures         = abap_true
      scan_used_types        = abap_true
      scan_function_groups   = abap_false
      scan_programs          = abap_false
      scan_deep              = abap_false
      scan_business_objects  = abap_false
      max_scan_depth         = 10
  ).

  " Define which types to scan (type range)
  DATA: lt_scan_types TYPE cl_uml_class_scanner=>uml_range_types,
        ls_scan_type  LIKE LINE OF lt_scan_types.

  IF p_obj IS NOT INITIAL.
    ls_scan_type-sign   = 'I'.
    ls_scan_type-option = 'EQ'.
    ls_scan_type-low    = p_obj.
    APPEND ls_scan_type TO lt_scan_types.
  ENDIF.

  " Define which packages to scan (package range)
  DATA: lt_scan_packages TYPE cl_uml_class_scanner=>uml_range_packages,
        ls_scan_package  LIKE LINE OF lt_scan_packages.

  IF p_pkg IS NOT INITIAL.
    ls_scan_package-sign   = 'I'.
    ls_scan_package-option = 'EQ'.
    ls_scan_package-low    = p_pkg.
    APPEND ls_scan_package TO lt_scan_packages.
  ENDIF.

  " Execute the scanner
  TRY.
      lo_uml_scanner->execute(
        EXPORTING
          scan_packages = lt_scan_packages
          scan_types    = lt_scan_types
      ).
    CATCH cx_root INTO DATA(lx_root).
      MESSAGE lx_root->get_text( ) TYPE 'E'.
      RETURN.
  ENDTRY.

  " Get the diagram data
  DATA: lv_kind TYPE c,
        lr_data TYPE REF TO data.

  lo_uml_scanner->get_diagram(
    IMPORTING
      e_kind = lv_kind
    CHANGING
      c_data = lr_data
  ).

  " Check if the returned kind is the expected UML table
  IF lv_kind <> lo_uml_scanner->c_kind_uml_tab.
    MESSAGE 'Unexpected diagram kind' TYPE 'E'.
    RETURN.
  ENDIF.

  " Assign the diagram data to a field symbol
  FIELD-SYMBOLS: <lt_uml_tab> TYPE cl_uml_class_scanner=>uml_tab.
  ASSIGN lr_data->* TO <lt_uml_tab>.

  IF sy-subrc <> 0 OR <lt_uml_tab> IS INITIAL.
    MESSAGE 'Failed to retrieve diagram data' TYPE 'E'.
    RETURN.
  ENDIF.

  " Define a configuration structure
  TYPES: BEGIN OF ty_config,
           include_data_types        TYPE abap_bool,
           include_method_parameters TYPE abap_bool,
           include_attributes        TYPE abap_bool,
           include_methods           TYPE abap_bool,
         END OF ty_config.

  " Data declaration for configuration
  DATA: ls_config TYPE ty_config.

  " Assign configuration parameters
  ls_config-include_data_types        = p_inc1.
  ls_config-include_method_parameters = p_inc2.
  ls_config-include_attributes        = p_inc3.
  ls_config-include_methods           = p_inc4.

  " Generate PlantUML text from the diagram data
  DATA: lt_output TYPE STANDARD TABLE OF string WITH DEFAULT KEY,
*        lt_relations TYPE STANDARD TABLE OF cl_uml_class_scanner=>uml_relation WITH DEFAULT KEY,
        lv_line   TYPE string.

  APPEND '@startuml' TO lt_output.

  " Process classes, interfaces, and collect relations
  LOOP AT <lt_uml_tab> ASSIGNING FIELD-SYMBOL(<ls_uml_line>).
    CASE <ls_uml_line>-kind.
      WHEN 'O' OR 'I'.
        " Start class or interface definition
        DATA(lv_name_class_interface) = replace( val = <ls_uml_line>-name sub = '\CLASS=' with = '' ).
        lv_name_class_interface = replace( val = lv_name_class_interface sub = '\INTERFACE=' with = '' ).

        lv_line = |{ COND #( WHEN <ls_uml_line>-is_abstract = abap_true THEN 'abstract' ELSE '' ) }|.
        lv_line = |{ lv_line }  { COND #( WHEN <ls_uml_line>-kind = 'O' THEN 'class' ELSE 'interface' ) } { lv_name_class_interface }|.
        lv_line = |{ lv_line } \{|.
        APPEND lv_line TO lt_output.

        " Process attributes
        IF ls_config-include_attributes = abap_true AND <ls_uml_line>-t_attributes IS NOT INITIAL.
          LOOP AT <ls_uml_line>-t_attributes ASSIGNING FIELD-SYMBOL(<ls_attribute>).



            lv_line = '  '.  " Indentation

            " Visibility
            CASE <ls_attribute>-visibility.
              WHEN c_vis_public.
                lv_line = lv_line && '+ '.
              WHEN c_vis_private.
                lv_line = lv_line && '- '.
              WHEN c_vis_protected.
                lv_line = lv_line && '# '.
              WHEN OTHERS.
                lv_line = lv_line && '~ '.
            ENDCASE.

            " Name
            lv_line = lv_line && <ls_attribute>-name.

            " Data type
            IF ls_config-include_data_types = abap_true AND <ls_attribute>-type IS NOT INITIAL.
              lv_line = |{ lv_line }  : { replace( val = <ls_attribute>-type sub = '\TYPE=' with = '' ) }|.
            ENDIF.

            IF <ls_attribute>-is_aggregation = abap_true.
              lv_line = |{ lv_line }[]|.
            ENDIF.

            IF <ls_attribute>-description IS NOT INITIAL.
              lv_line = |/' { <ls_attribute>-description } '/|.
            ENDIF.

            APPEND lv_line TO lt_output.
          ENDLOOP.
        ENDIF.

        " Process methods
        IF ls_config-include_methods = abap_true AND <ls_uml_line>-t_methods IS NOT INITIAL.
          LOOP AT <ls_uml_line>-t_methods ASSIGNING FIELD-SYMBOL(<ls_method>).
            lv_line = '  '.  " Indentation

            " Visibility
            CASE <ls_attribute>-visibility.
              WHEN c_vis_public.
                lv_line = lv_line && '+ '.
              WHEN c_vis_private.
                lv_line = lv_line && '- '.
              WHEN c_vis_protected.
                lv_line = lv_line && '# '.
              WHEN OTHERS.
                lv_line = lv_line && '~ '.
            ENDCASE.

            " Method name
            lv_line = lv_line && |{ COND #( WHEN <ls_uml_line>-is_abstract = abap_true THEN 'abstract' ELSE '' ) }|.
            lv_line = lv_line && |{ COND #( WHEN <ls_uml_line>-is_abstract = abap_true THEN 'static' ELSE '' ) }|.
            lv_line = |{ lv_line } { <ls_method>-name }|.

            " Parameters
            lv_line = lv_line && '('.
            IF ls_config-include_method_parameters = abap_true AND <ls_method>-t_parameters IS NOT INITIAL.
              DATA(lv_param_list) = ||.
              LOOP AT <ls_method>-t_parameters ASSIGNING FIELD-SYMBOL(<ls_param>).
                DATA(lv_param) = <ls_param>-name.
                IF ls_config-include_data_types = abap_true AND <ls_param>-type IS NOT INITIAL.
                  DATA(lv_param_type) = replace( val = <ls_param>-type sub = '\CLASS=' with = '' ).
                  lv_param_type = replace( val = lv_param_type sub = '\TYPE-POOL=ABAP' with = '' ).
                  lv_param_type = replace( val = lv_param_type sub = '\TYPE' with = '' ).
                  lv_param = |{ lv_param } : { lv_param_type }|.
                ENDIF.
                IF lv_param_list IS INITIAL.
                  lv_param_list = lv_param.
                ELSE.
                  CONCATENATE lv_param_list ', ' lv_param INTO lv_param_list.
                ENDIF.
              ENDLOOP.
              lv_line = lv_line && ' ' && lv_param_list.
            ENDIF.
            lv_line = lv_line && ' )'.

            " Return type

            APPEND lv_line TO lt_output.
          ENDLOOP.
        ENDIF.

        " Close class/interface block
        APPEND '}' TO lt_output.

      WHEN OTHERS.
        " Handle other types if necessary
    ENDCASE.
  ENDLOOP.

  " Process relations
  LOOP AT lt_relations ASSIGNING FIELD-SYMBOL(<ls_relation>).
    lv_line = <ls_relation>-from_class && ' ' &&
              <ls_relation>-rel_type   && ' ' &&
              <ls_relation>-to_class.
    APPEND lv_line TO lt_output.
  ENDLOOP.

  " Finish the PlantUML diagram
  APPEND '@enduml' TO lt_output.

  " Output the PlantUML text
  LOOP AT lt_output INTO lv_line.
    WRITE: / lv_line.
  ENDLOOP.