This repository has been archived by the owner on May 22, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathi-banco.h
105 lines (94 loc) · 2.5 KB
/
i-banco.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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
/*
// HEADER
// SO Project, version 4, exercise 4
// 2016/2017 - 1st Semestre
// Instituto Superior Tecnico
// U.C. Sistemas Operativos
// Rafael Ribeiro, nº 84758
*/
#ifndef IBANCO_H
#define IBANCO_H
#define MAXSONS 20
/*
* Function: commandCharge
* -------------------------------------------------------------------
* Removes money from the specified account
*
* accountID: ID of the account from which to remove money
* value: value to be removed from the account
*
* return: (void)
*/
void commandCharge(int accountID, int value);
/*
* Function: commandCredit
* -------------------------------------------------------------------
* Adds money to the specified account
*
* accountID: ID of the account to which to add money
* value: value to be added to the account
*
* return: (void)
*/
void commandCredit(int accountID, int value);
/*
* Function: commandReadBalance
* -------------------------------------------------------------------
* Prints the specified account's balance
*
* accountID: ID of the account from which to read the balance
*
* return: (void)
*/
void commandReadBalance(int accountID);
/*
* Function: commandTransfer
* -------------------------------------------------------------------
* Transfers money
*
* accountID1: ID of the account from which to remove the money
* accountID2: ID of the account to wich to add money
* value: value to be transfered
*
* return: (void)
*/
void commandTransfer(int accountID1, int accountID2, int value);
/*
* Function: startSimulation
* -------------------------------------------------------------------
* Verifies if it's possible to simulate
*
* numYears: number of years to simulate
*
* return: (void)
*/
void startSimulation(int numYears);
/*
* Function: commandSimulate
* -------------------------------------------------------------------
* Simulates the balance of all the accounts yearly for the specified time
*
* numYears: number of years to simulate
*
* return: (void)
*/
void commandSimulate(int numYears);
/*
* Function: commandExitNow
* -------------------------------------------------------------------
* Exits all the processes after they finish the current simulation year
* Exits main process
*
* return: (void)
*/
void commandExitNow();
/*
* Function: commandExitNormal
* -------------------------------------------------------------------
* Exits all the processes after finish the entire simulation
* Exits main process
*
* return: (void)
*/
void commandExitNormal();
#endif