From: <whe...@us...> - 2003-07-13 16:14:35
|
Update of /cvsroot/ordweb/uop/pos407/wayneh/week3 In directory sc8-pr-cvs1:/tmp/cvs-serv16516/pos407/wayneh/week3 Added Files: problems.txt Log Message: assignment for week3 - listing pages for 1st and 2nd editions of the book. --- NEW FILE: problems.txt --- page 459 in 2nd edition - page 428 (Chapter 9 in 1st editon) 2 a. Create an abstract class named Account for a bank. Include an integer field for the account number and a double field for the account balance. Also include a constructor that requires an account number and sets the balance to 0.0. Include a set method for the balance. Also include two abstract get methods-one for each field. Create two child classes of Account: Checking and Savings. Within the Checking class, the get method displays the String "Checking Account Information", the account number, and the balance. Within the Savings class, add a field to hold the interest rate, and require the Savings constructor to accept an argument for the value of the interest rate. The Savings get method displays the String "Savings Account Information", the account number, the balance, and the interest rate. SAve the Account.java, Checking.java and SAvings.java programs in the Chapter.12 folder on your student disk. b. Write a program named AccountArray in which you enteer data for a mix of 10 Checking and Savings accounts. Use a for loop to display the data. Save the AccountArray.java program in the Chapter.,12 folder on your student disk. |