A system to manage banking affairs, implemented in C.
· Display current account balance
· Record and display all banking activities
· Allow withdrawals from accounts
· Register a deposit
- This system should be able to register a new customer account by using a structure and store detailed information such as names, addresses, telephone numbers, account numbers, 6-digit personal identification number PINs (security code for using the card) and the account balance in the file.
- The system should display the menu for users to make choices.
- Customers’ account information should be stored and managed. Each customer can have one or more accounts and each account is uniquely identified by an account number generated by the system randomly.
- Bank statistical information such as the number of customers and the number of accounts can be collected and displayed.
- The following banking activities are supposed to be provided for customers.
- Display current account balance
- Record and display all banking activities
- Allow withdrawals from an account
- Register a deposit
- For the managers, the system should be capable of providing the functionalities shown below. Noted that all banking activities require the manager to log on at first.
- Access the account customers' information
- Access the number of customers to check the customers in the file
- Display the number of accounts
- The following activities need to be provided for bank clerks.
- Add new accounts including relevant information
- View all the register information and make deposits to customers' account
- Account information including the name, the address, the telephone number and the PIN can be edited
- Accounts can be deleted
- A number from 1 to 4 for users to make their choices on the main menu
- A number from 1 to 4 for managers to make their choices on the manager menu
- A number from 1 to 4 for manager to choose among bank activities
- A number from 1 to 5 for bank clerks to make a choice on the bank clerk menu
- Account numbers with exactly 10 digits
- PINs with 6 digits
- Manager account usernames with 4-16 characters
- Manager passwords with 6-12 characters
- Bank clerks' account usernames with 4-16 characters
- Bank clerks' passwords with 6-12 characters
- Customers' addresses with maximum 50 characters
- Customers' telephone numbers with maximum 15 digits
- A number from 1 to 5 for customers to choose on the customer menu
- An integer number representing the number of the withdraw
- An integer number representing the number of the register of a deposit
- The main menu of the bank information system
- Output warnings such as "Invalid input" and "xxx is illegal" if the inputs are not as required
- Different menus for different login users to choose their operations
- The number of customers and the number of accounts as the bank statistical information
- Prompt messages telling users whether they log on or off successfully
- The current account balance if needed
- Instructions about the maximum withdraw number
- Warnings if the database cannot be accessed
- Prompt messages asking users whether to continue their operation.
- Warnings if the relevant information is not existed
- The account number of the login customer
- Prompt messages asking bank clerks whether to view all the registers or not
- Relevant information of registers like account number
- Prompt messages asking users to input their passwords again for check
- Customers' information if required
To start with, several header files are included.
#include stdio.h is included for the standard input and output.
#include string.h is included for using the functions of string. For example, strlen().
#include Windows.h is used under Win32 console application.
#include conio.h is included for using the function getch().
#include stdlib.h is included for using various utility functions. For example, srand().
#include time.h is included for the initialization of the seed of function time().
A structure of customer is added, which contains 7 variables.
char cName[41] is a character array with 40 elements representing the name of the customer.
char cAddress[51] is a character array with 50 elements representing the address of the customer.
char cTelenumber[16] is a character array with 15 elements representing the telephone number of the customer.
char cAccount[11] is a character array with 10 elements representing the account number of the customer.
char cPIN[7] is a character array with 6 elements representing the password to the account.
int iBalance is an integer array representing the amount of balance.
int iRegister is an integer array representing the amount of registration.