views:

85

answers:

0

In a EIK Bank should I make now an account called Nice Item, all operations seem like a Basic Account, except those payments, which works as follows: At each accrual added 4% (rounded down) of the balance immediately after the last payments, provided that the period remains unclaimed in the account. Has closed the account, attributed to 0 $ for the whole period.

If this is the first payments, use the account's opening balance. Declare a structure Nice Item: "Account", which implement the above.

This is from my earlier asignment. maybe to any use:

signature KONTO 

  = sig
    (* The type of an account *)
    type konto

    (* aabn(s) opens a bank account with (s) ore *)
    val aabn : int -> konto

    (* trans(k,n) transfers the amount n to the account (k)  *)
    val trans : konto * int -> konto option

    (* saldo(k) returns current amount of the account (k) *)
    val saldo : konto -> int

    (* tilskriv(k) add interest of 2% to the account (k) *)
    val tilskriv : konto -> konto
end;