hi every 1 please i need your help to complete my code cause i could not complete it
it is for a bank wich
. Design it so it can be used by the bank’s staff. It should enable the following:
o Opening a new account for a customer
o Closing an account
o Displaying all accounts
An Account
o Contains the name of the customer
o Contains the account balance.
o Enables withdrawal from the account
o Enables depositing to the account
and
Transactions
Each account stores transactions information (the type of transaction (e.g. withdrawal, deposit …etc), the amount, the time of transaction and any additional information you think is important). When any transaction occurs this transaction is recorded in the account. So each account has more than one transaction. You should enable printing a report of a transactions performed on an account
Standing orders
In addition each account contains a number of standing orders .Standing orders store the following information (the day of the month which it is paid, the regular amount to be paid and to whom the SO is payable). You should enable adding, deleting and processing a standing order. Processing an SO means checking if the day of the month is today, if it is, then withdraws the amount from the account and recording this as a transaction. You should enable processing standing orders for all accounts.
Account Types
Extend account so that there will be two types of accounts
o Personal account
o When the account is overdrawn there is a charge of 10 $
o Company account
o On each withdrawal, or deposit there is a charge of 5 cents
here is the code i want to complete please help me as herry as you can
#include <vector>
#include <string>
#include <iostream>
using namespace::std;
class Account
{
public:
Account();
Account(string num, string n, double b);
void setName(string n);
string getName();
void setNum(string n);
string getNum();
void setbalance(double bal);
double getbalance();
void withdraw(double amount);
void deposit (double amount);
private:
string name;
string AccNum;
double balance;
void display;
};
class Bank
{
public:
void DisplayAllAccounts();
void OpenAccount();
void CloseAccount();
int FindAccountbyNumber(string accnum);
//Returns the index for the account having this number
int FindAccountbyName (string name);
//Returns the index for the account having this name
void Withdraw();
void Deposit();
void ShowAccount();
private:
vector<Account *> Accs; //A vector of account pointers
};
void Bank::OpenAccount()
{
string accnum;
string name;
double OpeningBalance;
// Read accnum,name,OpeningBalance from the user
Accs.push_back(new Account(accnum,name,OpeningBalance));
}
void Bank::CloseAccount()
{
int i;
string accnum;
string name;
//Read the account number or name from the user
i = FindAccountbyNumber(accnum);
//or
i = FindAccountbyName(name);
if (i != -1)
{
vector<Account *>::iterator p = Accs.begin();
p +=i;
delete Accs[i];
Accs.erase(p,p+1);
}
}
void Bank::Withdraw()
{
int i;
string accnum;
string name;
double amount, Newbalance;
//Read the account number or name from the user
//Read the amount to be withdrawn
i = FindAccountbyNumber(accnum);
//or
i = FindAccountbyName(name);
if (i != -1)
{
Accs[i]->withdraw(amount);
//Get the current balance
Newbalance = Accs[i]->getbalance();
//Display the current balance
}
}
}