CS 161 Homework 2 - Banking

Due Wed Sep 18 at 11:59pm

Overview

Computer science (and Java in particular) has a long history of use in business and finance. So for this homework, you will be coding a money program. You will implement a number of methods to help with common banking operations. You will be writing these methods from scratch--but don't panic, there will be lots of help to keep you on track!

This assignment should be completed individually.

Objectives

Necessary Files

You will be creating your own program from scratch for this assignment---select "Project > New Project" from the BlueJ menu to create a new project.

You will need to download a copy of the README.txt (right-click on the link and select "Save Link As" to download the file) to fill out and turn in along with your assignment.

Assignment Details

Be sure and read the instructions through carefully before you begin working. Knowing the overall goal will help you work on the individual pieces

Calculating Compound Interest

Imagine that you open a bank account that accrues compound interest---that is, an account where the interest earns is itself earning interest. Interest is compounded monthly: so if you have $100 in the account and earn 6% a year in interest, then 0.5% (1/12th) of the current balance will be added to the balance each month.

Calculating Change

The second piece of functionality you'll create for your Banking class is to calculate the value of lots of coins. This is to help tellers deal with people who want to deposite multiple years worth of loose change (it happens!)

Tester Class

You should also create a new BankingTester class that demonstrates and tests the methods you wrote. You should do this early, before you write other methods!

Development Notes

A quick note: your output should all appear in the Terminal window in BlueJ. If the terminal window isn't showing, you can see it by selecting "View > Show Terminal" from the BlueJ menu. Once you've got the terminal up, I highly recommend you select the following settings (make sure the terminal "has focus" and is the front window, and select the Options menu):

Extensions

If you're feeling adventurous, you might write a separate methods that rounds dollar amounts to the correct penny, and then call that method in your other classes so that everything is formatted correctly.

Submitting Your Assignment

Grading

This assignment will be graded on approximately the following criteria: