Assignment Five

This assignment to to write a data class named ATMButton. See the GenericExtendedButton class and Lab Exercise 7 for ideas. The class extends JButton, has a class that implements ActionListener and adds it to the button like GenericExtendedButton. There should be a Bank field, two String fields (one for an account number and one for an action) and two static double fields. The class has one constructor that takes three input parameters, two String objects and a Bank object. The first String object represents an action and will have value either "Deposit", "Withdraw" or "Balance". The button that is constructed will display the value of the String. The second String object is an account number . The third is a bank object. The account number represent an account in the bank. The class that implements the ActionListener interface will process the Bank object according to the String value by calling the corresponding Bank method. If the action is Deposit or Withdraw then prompt the user for an amount using a JOptionPane window. Use the account number and the amount to process the transaction. One static field will accumulate all deposit amounts and the other will accumulate all withdraw amounts. The files that use the ATMButton class are the main class AssignmentFive, the updated Bank class and the ATM class. Use the data file accountData.txt. The valid account numbers that you can use to run the program are 1234567, 1112223, 123456789, 5551119, 1357924 and 37373737. I will show how the program should work in class. This assignment is due on Wednesday March 25th at the beginning of class and there will be a quiz at that time.