Question: Design a class called Customer. The Customer class should contain the following data: firstName lastName accountNumber accountBalance Your class should have 2 constructors: one that
Design a class called Customer.
The Customer class should contain the following data: firstName lastName accountNumber accountBalance
Your class should have 2 constructors: one that just accepts the customers name, and one that also accepts the new account number and initial balance.
Your class should implement the sets and gets for the class, and contain a method to deposit, and a method to withdraw.
We will also add methods to compare, test for equals, and prepare information for display.
compile the Customer class, including the methods: equals, compareTo, toString. Use a driver class to: 1. Input information for a new customer from the keyboard. 2. Create the customer. 3. Deposit into the customers account. 4. Withdraw from the customers account. 5. Edit the customers name. 6. Display the customers information using the toString method.
You are writing a program to maintain customers information and transactions for a (small) bank.
Your program will use the Customer class designed in class, with each individual customer stored in a sorted array of Customer. You may use the compareTo method to sort the customers by name.
Your program should be able to: 1. Find a customers account by account number for deposits and withdrawals. 2. Find a customers account by searching for the customers name. 3. Deposit into an account, and show the new balance. 4. Withdraw from an account and show the new balance, if there is enough money! 5. Display a selected customers information. 6. Display all of the customers. (This will become a text file soon!)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
