properties and method in open edge

Mkontwg

Member
Hi Team

Create a class for Globalization. That will take the specific culture as a input parameter in the constructor. This parameter should have a property in the class that it gets assinged to. IT also needs to have properties for number decimal seporator and number group seporator and a culture date and time all these properties will be declared private and set via a method. Also create a void method called Build. When this method is called it should create a new instance of the class and all set the NumberFormat:NumberDecimalSeparator
and the NumberFormat:NumberGroupSeparator and the DateTimeFormat
tho what ever i set though the methods.

Does anyone knows or at least show me few steps to do this, im still new in open edge. Thanks.
 

Mkontwg

Member
Hi Team

Create a class for Globalization. That will take the specific culture as a input parameter in the constructor. This parameter should have a property in the class that it gets assinged to. IT also needs to have properties for number decimal seporator and number group seporator and a culture date and time all these properties will be declared private and set via a method. Also create a void method called Build. When this method is called it should create a new instance of the class and all set the NumberFormat:NumberDecimalSeparator
and the NumberFormat:NumberGroupSeparator and the DateTimeFormat
tho what ever i set though the methods.

Does anyone knows or at least show me few steps to do this, im still new in open edge. Thanks.
Code:
/*** My code for solving this problem here below***/

CLASS Client.Structure.Classes.clsGlobalization: 
  DEFINE PRIVATE PROPERTY cVariable  AS CHARACTER      NO-UNDO
    GET.
    SET.
      
  DEFINE PRIVATE PROPERTY cNumberDecSep AS CHARACTER  NO-UNDO
    GET.
    SET(cNumberDecSep AS CHARACTER):
        THIS-OBJECT:cNumberDecSep. 
    END SET.
  DEFINE PRIVATE PROPERTY cNumberGrpSep AS CHARACTER  NO-UNDO
    GET.
    SET(cNumberGrpSep AS CHARACTER):
        THIS-OBJECT:cNumberGrpSep. 
    END SET.
  DEFINE PRIVATE PROPERTY tDate AS DATETIME           NO-UNDO
    GET.
    SET(tDate AS DATETIME):
        THIS-OBJECT:tDate.
    END SET.
  
  
  CONSTRUCTOR PUBLIC clsGlobalization(INPUT cCulture AS CHARACTER):
      SUPER(). 
      ASSIGN cVariable = cCulture.
       CATCH e AS Progress.Lang.Error:
            UNDO, THROW e.
        END CATCH.
  END CONSTRUCTOR.
  
  METHOD PRIVATE CHARACTER Build():
  
  RETURN.
  END METHOD.
  
  END CLASS.
 
Top