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
- Have a BankAccount class which has
- each account should have a unique account number - different from every other account.
- each account should have its own balance
- Each account should note if it is tax Exempt or not.
- 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
- eg
BankAccount:
Account #: 24
Balance: 342.34
Taxable: False
- repeatedly prompt your users to enter bank accounts until they give you a sentinal value. (you choose the sentinal value)
- make sure to tell the user what the sentinal value is
- 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.
- Create a BankAccount for each set of data that the user enters and then add it to your collection.
- You need a second class to manage your data input and collections.
- once you have the data all entered to the following to the data (not necessarily in this order)
- print out the account with the lowest balance
- print out the account with the highsest balance
- print out the average balance
- print out the middle value.
- continuously ask the user if they want to sort the data by account number or by balance (or quit)
- then sort the data when they ask
- display the entire sorted data collection (graphically) each time the user askes for a new sort.
- 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)
- 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.
- You may have no more than 2-3 lines in your main method.
- You must have your array or ArrayList object be an instance variable in (one of) your class(es)
- You must comment your code. We are starting to get to the point
where you are writing longer programs and doing more on your own. you
will need to start commenting your code so that both you and I know
what you are trying to do. To this end credit in the assignment will be
reservedfor grading your comments.
- Add a readme.txt file as a text file in your submission. Your
readme file should contain
- your name
- a brief (one paragraph) description of how
you implemented the project (things like, how many classes you used, what those classes do and so on.)
- anything that is left undone in the project.
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.