fdlt3817
2 years ago
10 changed files with 123 additions and 76 deletions
-
3.gitignore
-
7src/currencyExchange.h
-
3src/currentCustomerAccountBalance.c
-
7src/depositMoney.h
-
7src/lineReplacer.h
-
14src/updateCustomerAccountBalance.c
-
30src/withdrawMoney.c
-
10src/withdrawMoney.h
-
44tests/test_currencyExchange.c
-
74tests/test_currentCustomerAccountBalance.c
@ -1,2 +1,3 @@ |
|||||
.DS_Store |
.DS_Store |
||||
.vscode |
|
||||
|
.vscode |
||||
|
src/a.out |
@ -1,6 +1,11 @@ |
|||||
|
#ifndef LINEREPLACER_H_ |
||||
|
#define LINEREPLACER_H_ |
||||
|
|
||||
#include <stdio.h> |
#include <stdio.h> |
||||
#include <stdbool.h> |
#include <stdbool.h> |
||||
#include <stdlib.h> |
#include <stdlib.h> |
||||
#include <string.h> |
#include <string.h> |
||||
|
|
||||
void replaceLineInFile(const char* file_name, int line, const char* new_line); //replaces the line at "line" on the file "file_name", with the new line "new_line". |
|
||||
|
void replaceLineInFile(const char* file_name, int line, const char* new_line); //replaces the line at "line" on the file "file_name", with the new line "new_line". |
||||
|
|
||||
|
#endif |
@ -1,6 +1,12 @@ |
|||||
|
#ifndef WITHDRAWMONEY_H_ |
||||
|
#define WITHDRAWMONEY_H_ |
||||
|
|
||||
#include <stdio.h> |
#include <stdio.h> |
||||
#include <stdbool.h> |
#include <stdbool.h> |
||||
|
|
||||
void withdraw(int user_id); |
|
||||
|
bool withdraw(int user_id); |
||||
float initiateWithdraw(float amountToWithdraw, float availableAccountBalance); |
float initiateWithdraw(float amountToWithdraw, float availableAccountBalance); |
||||
void notifyCustomer(float amountToWithdraw, float remainingAccountBalance); |
|
||||
|
void notifyCustomer(float amountToWithdraw, float remainingAccountBalance); |
||||
|
bool withdrawSpecificAmount(int user_id, float amountToWithdraw); |
||||
|
|
||||
|
#endif |
Write
Preview
Loading…
Cancel
Save
Reference in new issue