diff options
Diffstat (limited to 'src/test/java/smyth/BankAccount.oj')
-rw-r--r-- | src/test/java/smyth/BankAccount.oj | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/test/java/smyth/BankAccount.oj b/src/test/java/smyth/BankAccount.oj new file mode 100644 index 0000000..d2402af --- /dev/null +++ b/src/test/java/smyth/BankAccount.oj @@ -0,0 +1,25 @@ +import smyth; + +public distributed class BankAccount instantiates MDistributed { + private int balance = 100; + + public BankAccount() { + super(); + } + + public int getBalance() { + return balance; + } + + public void deposit(int d) { + System.out.println(d); + balance += d; + System.out.println(d + " has been deposited in your account."); + } + + public void withdraw(int w) { + System.out.println(w); + balance -= w; + System.out.println(w + " has been withdrawn from your account."); + } +} |