fdlt3817
2 years ago
10 changed files with 123 additions and 76 deletions
-
1.gitignore
-
5src/currencyExchange.h
-
3src/currentCustomerAccountBalance.c
-
5src/depositMoney.h
-
5src/lineReplacer.h
-
14src/updateCustomerAccountBalance.c
-
28src/withdrawMoney.c
-
8src/withdrawMoney.h
-
42tests/test_currencyExchange.c
-
70tests/test_currentCustomerAccountBalance.c
@ -1,2 +1,3 @@ |
|||
.DS_Store |
|||
.vscode |
|||
src/a.out |
@ -1,6 +1,11 @@ |
|||
#ifndef LINEREPLACER_H_ |
|||
#define LINEREPLACER_H_ |
|||
|
|||
#include <stdio.h> |
|||
#include <stdbool.h> |
|||
#include <stdlib.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". |
|||
|
|||
#endif |
@ -1,6 +1,12 @@ |
|||
#ifndef WITHDRAWMONEY_H_ |
|||
#define WITHDRAWMONEY_H_ |
|||
|
|||
#include <stdio.h> |
|||
#include <stdbool.h> |
|||
|
|||
void withdraw(int user_id); |
|||
bool withdraw(int user_id); |
|||
float initiateWithdraw(float amountToWithdraw, float availableAccountBalance); |
|||
void notifyCustomer(float amountToWithdraw, float remainingAccountBalance); |
|||
bool withdrawSpecificAmount(int user_id, float amountToWithdraw); |
|||
|
|||
#endif |
Write
Preview
Loading…
Cancel
Save
Reference in new issue