/*
Name: Program for Alibaba bank account, aiming to build a simple bank system using class and objects, but with multiple users input.
Author: muguangde
Date:09/22/2014-09:21AM
Description: This is a small program to simulate bank
account management. User create an account first, then
perform other operations.
*/
//Bank.h
#include "Account.h"
#include <iostream>
#include <fstream>
class Bank
{
private:
Account * acct[100];
int numaccts;
int nopen, nclosed;
public:
/* Bank Constructor: initialize all Bank variables */
Bank() {
nopen = nclosed = numaccts = 0;
}
/* Destructor for the Bank Constructor */
~Bank() {
for(int i = 0; i < numaccts; i++) {
delete acct[i];
}
}
//Bank: Read initial user info from file
void readInitial();
/* Bank: Read Accounts Function */
void readAccts();
/* Bank: Find Account Function */
int find(int );
/* Bank: New Account Function */
void newAcct();
/* Bank: Deposit Function */
void deposit();
/* Bank: Withdrawal Function */
void withdrawal();
/* Bank: Inquiry Function */
void inquiry();
/* Bank: Process Transactions Function */
void processTransactions();
/* Bank: Menu Function */
void menu();
/* Bank: Type Menu Function */
void typemenu();
/* Bank: Print All Accounts Function */
void printAllAccts();
/* Close Account function */
void closeAcct();
/* Reopen Account function */
void reopenAcct();
/* Bank: Delete Account Function */
void deleteAcct();
};
回到主页
回到目录