Java Reference
In-Depth Information
HighInterestChecking : A checking account with high interest is a checking account
with no monthly service charge. Therefore, it inherits all the properties of a no service charge
checking account. Furthermore, this type of account pays higher interest and requires higher
minimum balance than the no service charge checking account. The named constants,
instance variables, and methods of this class are described in Figure 10-12, which also shows
the UML class diagram of the class HighInterestChecking .
HighInterestChecking
-INTEREST_RATE = 0.05: static final double
-MIN_BALANCE = 5000.00: static final double
+HighInterestChecking(String, int , double )
+HighInterestChecking(String, int , double , double , double )
+getInterestRate(): double
+setInterestRate( double ): void
+postInterest(): void
+createMonthlyStatement(): void
+toString(): String
FIGURE 10-12 UML class diagram of the class HighInterestChecking
SavingsAccount : A savings account is a bank account. Therefore, it inherits all
the properties of a bank account. Furthermore, a savings account also pays interest. The
named constants, instance variables, and methods of this class are described in Figure 10-13,
which also shows the UML class diagram of the class SavingsAccount .
1
0
SavingsAccount
-INTEREST_RATE = 0.03: static final double
#interestRate: double
+SavingsAccount(String, int , double )
+SavingsAccount(String, int , double , double )
+getInterestRate(): double
+setInterestRate( double ): void
+postInterest(): void
+createMonthlyStatement(): void
+toString(): String
FIGURE 10-13 UML class diagram of the class SavingsAccount
HighInterestSavings : A high interest savings account is a savings account. Therefore, it
inherits all the properties of a savings account. It also requires a minimum balance. The
named constants, instance variables, and methods of this class are described in Figure 10-14,
which also shows the UML class diagram of the class HighInterestSavings .
Search WWH ::




Custom Search