From a0604e41fa643be683e62f9f8c0ce6c61ad060ec Mon Sep 17 00:00:00 2001 From: fdai7057 Date: Fri, 10 Feb 2023 20:36:28 +0100 Subject: [PATCH] After merge combine parts of our program. --- src/CustomerData.txt | 4 ++-- src/_file_information.h | 2 +- src/customerMenu.c | 11 ++++++++--- src/employeesCredentialsList.txt | 7 +++++++ src/employeesData.txt | 14 ++++++++++++++ 5 files changed, 32 insertions(+), 6 deletions(-) diff --git a/src/CustomerData.txt b/src/CustomerData.txt index 3a6723a..41693a1 100644 --- a/src/CustomerData.txt +++ b/src/CustomerData.txt @@ -58,12 +58,12 @@ ID=6984947 Forename=Karl Surname=Marx Password=okdsjhasdjhksdj -Balance=600.0000€ +balance=610 7765335=123 ID=7765335 Forename=Friedrich Surname=Moller Password=123 -Balance=50.0000€ +balance=858.2 diff --git a/src/_file_information.h b/src/_file_information.h index 9b919c4..9334868 100644 --- a/src/_file_information.h +++ b/src/_file_information.h @@ -1,2 +1,2 @@ #define MAX_LENGTH 200 -#define CUSTOMER_DATA_FILE "src/CustomerData.txt" \ No newline at end of file +#define CUSTOMER_DATA_FILE "src/CustomerData.txt" diff --git a/src/customerMenu.c b/src/customerMenu.c index 2d21d3d..c75e666 100644 --- a/src/customerMenu.c +++ b/src/customerMenu.c @@ -1,23 +1,28 @@ #include "customerMenu.h" +#include "sendMoney.h" +#include "withdrawMoney.h" +#include "depositMoney.h" + int customerChoiceForMenuItem(int numberOfMenuItem, unsigned int *ptr) { int returnStatus = 0; + int ID = *ptr; switch(numberOfMenuItem){ case 1: puts("You have chosen to send money.\n"); returnStatus = 1; - //call sendMoney(); + sendMoney(ID); break; case 2: puts("You have chosen to withdraw money.\n"); returnStatus = 2; - //call withDrawMoney(); + withdraw(ID); break; case 3: puts("You have chosen to deposit money.\n"); returnStatus = 3; - //call depositMoney(); + depositMoney(ID); break; case 4: puts("You have chosen to request a loan.\n"); diff --git a/src/employeesCredentialsList.txt b/src/employeesCredentialsList.txt index 7b854aa..8fb27cc 100644 --- a/src/employeesCredentialsList.txt +++ b/src/employeesCredentialsList.txt @@ -29,6 +29,13 @@ Shivam Schivam007fdlt3781 + + + + + + + diff --git a/src/employeesData.txt b/src/employeesData.txt index bf7405b..2adbdff 100644 --- a/src/employeesData.txt +++ b/src/employeesData.txt @@ -73,6 +73,20 @@ Phone number : +4918756871384 + + + + + + + + + + + + + +