Account
-balance: double
+getBalance(): double
+charge(sale: double): void
+makePayment(payment: double) : void
+printStatement(): void
+Account()
a. Use the class above to write a few lines of code that will create a new
account, with a zero balance (this is what the default constructor will do).
b. Charge three sales to your account created in a) for $25.13, $43.98, and
$5.00.
c. Make a $50 payment to your account in a).
d. Print out a statement for your account in a) if the account has a balance of
over $1.
2007-03-23
14:17:18
·
3 answers
·
asked by
Anonymous
in
Computers & Internet
➔ Programming & Design