Threesuns

Email the Instructor

Contact

All Semesters

Semesters

All Courses

Courses

2016Fall

08.17.15 - 12.13.15

C Language

CSCI2473

Monday Wednesday
10:00 AM - 11:20 AM

Multiple Bank Accounts with Functions

Lab07

Objective: to practice using arrays and functions

pastdue

Submit Your Solution

Lab07

Request a Copy of your Solution

Lab07

Requirements

Program compiles without errors5 pts
Menu functions as specified5 pts
User is allowed to open up to 5 accounts but no more20 pts
Accounts can be listed 10 pts
Accounts can be deposited to individually20 pts
Accounts can be withdrawn from individually20 pts
Invalid inputs from the user are handled in all cases10 pts
At least one function was created and used in writing the program5 pts
2 or more functions were created and used when writing the program5 pts
Total100 pts

Instructions

Write a C program that will allow a user to interact with a simulated bank. The bank will allow the user to open up to 5 accounts and each account will start with a 0 balance every time the program starts. The program is only responsible for dealing with the balance of up to 5 accounts, don't worry about interest rates or anything other than the balance.

The Menu

Your application should display the following menu for the user and continue to show them the menu after each of their choices are complete until the user chooses option 5 to quit. The user should be informed if they make an invalid choice and the menu should be redisplayed.
1. Open Account
2. List Accounts
3. Deposit
4. Withdraw
5. Exit

Menu Description

  1. The open account option should allow the user to open a bank account. The new account will start with a 0 balance. The user should only be allowed to open 5 accounts, if they attempt to open any more accounts after the 5th your program should show them an error.
  2. The list accounts option should allow the user to view the nicely formatted balance of all of their open accounts.
  3. The deposit and withdraw options should allow the user to deposit money in, or withdraw money from a specific account. To do this the user will need to be shown a list of their open accounts and prompted for which one of those account they wish to interact with. If the user chooses an account that isn't opened or doesn't otherwise exist your program should display an error for the user. If they choose an open account then the user should be prompted to enter an amount. The amount the user enters needs to be a positive number for both deposit and withdraw and needs to be less than the balance for withdraw. After either option is successful the user should be able to see that their balance has changed by choosing option 2 from the menu.
  4. See option 3
  5. Quit the application

The program should provide enough output/feedback to the user to be friendly and easy to use.

Extras