-
Notifications
You must be signed in to change notification settings - Fork 2
/
Client.h
80 lines (63 loc) · 2.69 KB
/
Client.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
/*
* Client.h
*
* Created on: Feb 1, 2014
* Author: Junjieliao
*/
#ifndef CLIENT_H_
#define CLIENT_H_
#include "Person.h"
#include "InternalAccount.h"
using namespace std;
class Client:public Person {
public:
Client();//default Constructor
virtual ~Client();//default destructor
Client(InternalAccount &a, InternalAccount &b);
//Constructor that copies the information from
//other two InternalAccounts and store the information
//into member heldAccount[0] and heldAccount[1]
void getHeldAccount(InternalAccount &a, InternalAccount &b);
//Function passes heldAccounts from other internalAccounts' heldAccounts.
//to the local member heldAccouts
//Pass the information of heldAccounts from other input InternalAccounts,
//and store them into the local member heldAccount
void setHeldAccount(InternalAccount &a, InternalAccount &b);
//Function sets the heldAccounts for the other two InternalAccounts' members
//Pass the information from the local member heldAccount to the members
//heldAccounts to the other input InternalAccounts' heldAccounts
void copyClient(Client &into);
//Function copies information from local client to the input client
//Pass the information from local heldAccounts to the input Client' heldAccounts;
//pass the information of a person like name, birthday, gender, phone number,
//address, email and user name to the input Client;
//pass the password from local password to the input Client;
//pass the account number from local password to the input Client
void viewInternalAccount();
//function calls displayExternalAccount()
void withdraw();
//ask the user which account they wish to withdraw from and how much
//check to see that money is less than the total amount of money
//in the account.If it is, subtract that money from the account,
//or else print an error message
void deposit();
//ask the user what account they wish to deposit form and how much
//add that money to the account
void transfer();
//ask the user what account they wish to transfer from and how
//much money, check to see that money is less than the total
//amount of money in the account.If it is, ask which account they
//want to transfer this money into and make the transfer, or else
//print an error message
void printOptions();
//print and number the capabilities of the client(make a
//withdrawal, deposit of transfer)
//ask the option which the user wants to do(by number)and call
//the respective function
void logout();
//overwrite all the information which means all the values of all members
//back into the account-number-corresponding text file
protected:
InternalAccount heldAccount[2];
};
#endif /* CLIENT_H_ */