%TOC%

---+CCar.class ---++The Program This is just a clas which is used in different prjects. ---++The Code:

    PRIVATE brand AS String
    PRIVATE ps_power AS Integer
    PRIVATE kw_power AS Float
    PRIVATE price AS Float

    PUBLIC SUB _new(OPTIONAL br AS String, OPTIONAL po AS Integer, OPTIONAL pr AS Float)
      brand = br
      ps_power = po
      price = pr
    END

    PUBLIC SUB setBrand(x AS String)
      brand = x
    END
    PUBLIC FUNCTION getBrand() AS String
      RETURN Brand
    END

    PUBLIC SUB setPS_Power(x AS Integer)
      ps_power = x
    END
    PUBLIC FUNCTION getPS_Power() AS Integer
      RETURN ps_power
    END

    PUBLIC SUB setPrice(x AS Float)
      price = x
    END
    PUBLIC FUNCTION getPrice() AS Float
      RETURN price
    END

'setKW_Power is private because 'it is only for internal use

    PRIVATE FUNCTION setKW_Power() AS Float
      RETURN ps_power * 0.736
    END
    PUBLIC FUNCTION getKW_Power() AS Float
      RETURN setKW_Power()
    END

%INCLUDE{"ReferenceBy"}%