-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathAccount.h
74 lines (64 loc) · 1.32 KB
/
Account.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
/** Account class in a C++ code.
*
* #include "Account.h" <BR>
* -llib
*
*/
#ifndef ACCOUNT_H
#define ACCOUNT_H
// SYSTEM INCLUDES
#include<iostream>
// Account class definition
class Account {
public:
// LIFECYCLE
/** Default + Overloaded constructor.
*/
Account(int = 0, float = 0.0);
// Use compiler-generated copy constructor, assignment, and destructor.
// Account(const Account&);
// Account& operator=(const Account&);
// ~Account();
// OPERATIONS
/** function that deposits amount.
*
* @param aAmount The amount to be deposited.
*
* @return void
*/
void Deposit(float aAmount = 0.0);
/** function that withdraws amount.
*
* @param aAmount The amount to be withdrawn.
*
* @return void
*/
void Withdraw(float aAmount = 0);
/** function that prints balance.
*
* @param void
*
* @return void
*/
void PrintBalance()const;
// ACCESS
// setters
void SetAccountID(int = 0);
void SetValue(float = 0.0);
void SetAccount(int = 0, float = 0.0);
/**
# @overload void SetAccount(const Account&);
*/
void SetAccount(const Account&);
// getters
int GetAccountID()const;
float GetValue()const;
const Account& GetAccount()const;
private:
// DATA MEMBERS
int mAccountID;
float mValue;
};
// end class Account
#endif
// _ACCOUNT_H_