Assignment 4

Back ] Up ] Next ]

Discussion group, leave your messages

Home
Assignment 1
Assignment 2
Assignment 3
Assignment 4
Assignment 5
Last Assignment

 

Implement a simulation to a Bank system

In this assignment you will implement a small bank simulation program, using the control structure if to ensure that no money is overdrawn beyond what is available for a particular customer also avoid improper deposits.

Details:

Suppose that you have $1000 to start with. So, your constructor will initialize the instance variable amount with $1000. You will go through the process of depositing and withdrawing money and requesting for the current balance.

Things that you should have on your constructor:

bullet

Client Name

bullet

Account Number

bullet

Initial Amount ($1000) 

 Create a main method and this client should go through this process:

  1. Create a object called customer

  2. Display the Client's name, Account and Initial amount for this customer

  3. Deposit $100

  4. Display balance

  5. Deposit $0 (User's should be told that they can not deposit $0 or negative values, implement if statement to check for negative or  $0 deposits)

  6. Display balance

  7. Withdraw $500

  8. Display balance

  9. Withdraw $500

  10. Display balance

  11. Withdraw $150 (At his point your program should indicate that you are not allowed to withdraw more money than what is available)

  12. Display amount available.

  13. Withdraw $200 (Again, user should be told that they are not allowed to take more $ than what is available and display the balance)

  14. Finish the program by displaying "thank you, come back again"

Any questions, let instructor know.

TURN IN:

Place it all in a large envelope

bullet

A hard copy of your program, well documented with precondition and postconditions

bullet

A copy of your project on the floppy disk

bullet

A copy of the DOC document

bullet

A hard copy of your output

 

 

 

Back to CS161 JAVA Homepage
This page was last modified January 10, 2002
wmorales@pcc.edu