Java Reference
In-Depth Information
HighInterestSavings
-MINIMUM_BALANCE = 2500.00: static final double
-INTEREST_RATE = 0.05: static final double
#minimumBalance: double
+HighInterestSavings(String, int , double )
+HighInterestSavings(String, int , double , double , double )
+getMinimumBalance(): double
+verifyMinimumBalance( double ): boolean
+withdraw( double ): void
+toString(): String
FIGURE 10-14 UML class diagram of the class HighInterestSavings
CertificateOfDeposit : A certificate of deposit account is a bank account. Therefore, it
inherits all the properties of a bank account. In addition, it has instance variables to store the
number of CD maturity months, the interest rate, and the current CD month. The named
constants, instance variables, and methods of this class are listed in Figure 10-15, which also
shows the UML class diagram of the class CertificateOfDeposit .
CertificateOfDeposit
-INTEREST_RATE = 0.05: static final double
-NUMBER_OF_MATURITY_MONTHS = 6: static final int
-interestRate: double
-maturityMonths: int
-cdMonth: int
+CertificateOfDeposit(String, int , double )
+CertificateOfDeposit(String, int , double , double , int )
+getInterestRate(): double
+setInterestRate( double ): void
+getCurrentCDMonth(): double
+setCurrentCDMonth( int ): void
+getMaturityMonths(): double
+setMaturityMonths( int ): void
+postInterest(): void
+withdraw( double ): void
+withdraw(): void
+createMonthlyStatement(): void
+toString(): String
FIGURE 10-15 UML class diagram of the class CertificateOfDeposit
To create various types of accounts, we can use a Vector object. Recall from Chapter 9
that a Vector object can increase in size if additional accounts are needed to be created.
The elements of the Vector are of type BankAccount , and six different kinds of bank
Search WWH ::




Custom Search