Comp 151 Project 7

Your Last project

Due: Tuesday May3rd at 11:59pm

Summary: In this last project you will use many of the programming skills that you have learned through the semester with a special focus on using Collections.

Details:

Since this is your last project, you are given freedom to design this project as you see fit with only a few restrictions listed here in the requirements and the Addional Restrictions section below:

Your program must
  1. Have a BankAccount class which has
    1. each account should have a unique account number - different from every other account.
    2. each account should have its own balance
    3. Each account should note if it is tax Exempt or not.
    4. each BankAccount must have a toString method which returns a string representation of the object with its instance variables. Make sure that the string you return is formatted to give each instance variable its own line
      1. eg
BankAccount: 
Account #: 24
Balance: 342.34
Taxable: False
  1. repeatedly  prompt your users to enter bank accounts until they give you a sentinal value. (you choose the sentinal value)
    1. make sure to tell the user what the sentinal value is
    2. if you are using an array rather than an array list make sure to create an array of at least size 25 to hold all of the values.
    3. Create a BankAccount for each set of data that the user enters and then add it to your collection.
    4. You need a second class to manage your data input and collections.
  2. once you have the data all entered to the following to the data (not necessarily in this order)
    1. print out the account with the lowest balance
    2. print out the account with the highsest balance
    3. print out the average balance
    4. print out the middle value.
    5. continuously ask the user if they want to sort the data by account number or by balance (or quit)
      1. then sort the data when they ask
      2. display the entire sorted data collection (graphically) each time the user askes for a new sort.
        1. I have a class called CollectionDisplay which has a method called displayCollection which takes an ArrayList as a parameter and will then display that ArrayList graphically. If you use this, make sure to pass a copy of your ArrayList to that method and not the original ArrayList. (You'll need to use a copy Constructor)
        2. if the display looks a little wacky thats fine so long as you have followed the directions. My code doesn't look very deeply into what it is displaying for best display looks.


Additional restrictions:
To help you get in the habit of good program writing, I am imposing the following additional restrictions on your program.



Submitting:

again zip up your project folder and submit it to me by email. Make sure that your submitted zip file contains your first initial and last name as part of the zip file name.