      ************************************************************************
      * Copyright (C) 1991-1999 Micro Focus International Ltd.
      * All rights reserved.
      *  
      * This demonstration program is provided for use by users of 
      * Micro Focus products (the "Software") and may be used, 
      * modified and distributed as part of your application provided 
      * that you properly acknowledge the copyright of Micro Focus in this
      * material.
      *     
      * All conditions, warranties and undertakings, express or implied, 
      * statutory or otherwise, on the part of Micro Focus are excluded, 
      * including without limitation those of merchantability or fitness  
      * for purpose. This shall not, however, purport to exclude or 
      * restrict the liability of Micro Focus to any extent not 
      * permitted by law.
      *
      * IN NO EVENT WILL MICRO FOCUS BE LIABLE FOR ANY INDIRECT, 
      * INCIDENTAL, SPECIAL, CONSEQUENTIAL OR OTHER DAMAGES ARISING OUT 
      * OF THE USE OF THE DEMONSTRATION PROGRAM DISTRIBUTED WITH THE 
      * SOFTWARE, WHETHER OR NOT INFORMED OF THE POSSIBILITIES OF 
      * DAMAGES IN ADVANCE.  THESE LIMITATIONS APPLY TO ALL CAUSES OF 
      * ACTION, INCLUDING BREACH OF CONTRACT, BREACH OF WARRANTY, STRICT
      * LIABILITY, AND ANY ACTIONS IN TORTS.
      ************************************************************************
      *
      * The external class definition for the Account class.
      *
      ************************************************************************

       class-id. Account is external.

        object section.
        class-control.
           Account is class "ACCOUNT"
           Base is class "BASE".
      * I001. Interface definition for the CREATE verb. This is called
      * the verb signature.
       class-object.
       method-id. "openAccount".

       linkage section.
       01 lsName           pic x(10).
       01 lsInitialValue   pic 9(10)v99.
       01 lsAccount        object reference.

      * I001. Definition of the CREATE verb.
      * Note that the verb in the definition does not have to be the
      * same as the method name. Brackets [] indicate noise words.

       procedure division using lsName lsinitialValue
                      returning lsAccount
        INVOKED AS ==Create     [a] [old] [new] <self>
                     FOR <lsName>
                     [with] <lsInitialValue>
                     [giving] [back] [a] <lsAccount> == .

      * <self> can be <this> or <object> and identifies the place in the
      *  syntaxwhere the target object is specified. In this case, the
      * target object is the name of one of the account classes, for
      * example, CheckAccount.

       end method "openAccount".
       end class-object.
       Object.

      * I002. Definition of the Withdraw verb.
       method-id. withdraw.
       linkage section.
       01 lsAmount pic 9(10)v99.

       procedure division using lsAmount

       INVOKED AS ==Withdraw <lsAmount> [from] <self> ==
      *-----I003. Debit is an alternative verb to Withdraw
            OR AS ==Debit <self> [with] <lsAmount> ==.

       end method withdraw.

      * I004. Definition of the deposit verb.
       method-id. deposit.
       linkage section.
       01 lsAmount pic 9(10)v99.

       procedure division using lsAmount

       INVOKED AS ==Deposit <lsAmount> [to] <self> ==
            OR AS ==Credit <self> [with] <lsAmount> ==.

       end method deposit.

       method-id. printStatement.

      * I005. Definition of the Print verb.
       procedure division

       INVOKED AS ==Print <self> [as] [a] [statement] ==.

       end method printStatement.

      * I006. Definition of
       method-id. getBalance.
       linkage section.
       01 lsAmount pic S9(10)v99.

       procedure division returning lsAmount

       INVOKED AS ==Get [the] [balance] [for] <self>
                               Giving <lsAmount> ==
               OR FUNCTION == Balance (<self>) ==.

       end method getbalance.

       end object.
       end class Account.
