Java Reference
In-Depth Information
ServiceChargeChecking
-ACCOUNT_SERVICE_CHARGE = 10.00:
static final double
-MAXIMUM_NUM_OF_CHECKS = 5:
static final int
-SERVICE_CHARGE_EXCESS_NUM_OF_CHECKS = 5:
static final double
#serviceChargeAccount:
double
#serviceChargeCheck:
double
#numberOfChecksWritten:
int
+ServiceChargeChecking(String,
int
,
double
)
+ServiceChargeChecking(String,
int
,
double
,
double
,
double
)
+getServiceChargeAccount():
double
+setServiceChargeAccount(
double
):
void
+getServiceChargeChecks():
double
+setServiceChargeChecks(
double
):
void
+getNumberOfChecksWritten():
int
+setNumberOfChecksWritten(
int
):
void
+postServiceCharge():
void
+writeCheck(
double
):
void
+createMonthlyStatement():
void
+toString(): String
FIGURE 10-10
UML class diagram of the
class
ServiceChargeChecking
NoServiceChargeChecking
: A checking account with no monthly service charge is a
checking account. Therefore, it inherits all the properties of a checking account.
Furthermore, this type of account pays interest, allows the account holder to write
checks, and requires a minimum balance. The named constants, instance variables, and
methods of this class are described in Figure 10-11, which also shows the UML class
diagram of the
class
NoServiceChargeChecking
.
NoServiceChargeChecking
-MIN_BALANCE = 1000.00:
static final double
-INTEREST_RATE = 0.02:
static final double
#minimumBalance:
double
#interestRate:
double
+NoServiceChargeChecking(String,
int
,
double
)
+NoServiceChargeChecking(String,
int
,
double
,
double
,
double
)
+getMinimumBalance():
double
+setMinimumBalance(
double
):
void
+verifyMinimumBalance(
double
):
boolean
+writeCheck(
double
):
void
+withdraw(
double
):
void
+createMonthlyStatement():
void
+toString(): String
FIGURE 10-11
UML class diagram of the
class
NoServiceChargeChecking
Search WWH ::
Custom Search