1
2
3
4 package org.sourceforge.jemm.sample.demo1.model.orig;
5
6 import org.sourceforge.jemm.Entity;
7
8
9
10
11
12
13
14 @Entity
15 public class SavingsAccount extends Account {
16 double lastInterestAmount;
17
18
19
20
21 public SavingsAccount() {
22 lastInterestAmount = 0;
23 }
24
25
26
27
28
29
30
31 public SavingsAccount(double initialBalance) {
32 super(initialBalance);
33 }
34
35
36
37
38
39
40
41 public synchronized void addInterest(double interestRate) {
42 lastInterestAmount = balance * interestRate / 100;
43 balance = balance + lastInterestAmount;
44 }
45 }