Browse Source

Solve merge conflicts.

remotes/origin/Alpha
fdai7207 2 years ago
parent
commit
3de75024cd
  1. 2
      .gitignore
  2. 7
      build-project.sh
  3. 3
      project.yml
  4. 7
      src/CustomerData.txt
  5. 2
      src/customerMenu.c
  6. 1
      src/customerMenu.h
  7. 83
      src/employeesCredentialsList.txt
  8. 56
      src/employeesData.txt
  9. 29
      src/requestLoan.c
  10. 5
      src/requestLoan.h
  11. 9
      team.md
  12. 1
      tests/test_CustomerMenu.c
  13. 1
      tests/test_LoginCustomer.c
  14. 1
      tests/test_mainMenu.c
  15. 23
      tests/test_requestLoan.c

2
.gitignore

@ -1,2 +0,0 @@
.DS_Store
.swp

7
build-project.sh

@ -27,11 +27,6 @@ for file in employeeLogin.c mainMenu.c createEmployeeAccount.c; do
cp "$file" "$file.bak"
done
# replace .c with .h in respective files
#sed -i 's/createEmployeeAccount.c/createEmployeeAccount.h/g' mainMenu.c
#sed -i 's/showGeneralInfoEmployee.c/showGeneralInfoEmployee.h/g' employeeLogin.c
#sed -i 's/mainMenu.c/mainMenu.h/g' employeeLogin.c
#sed -i 's/employeeLogin.c/employeeLogin.h/g' createEmployeeAccount.c
# remove 'src/'
for file in employeeLogin.c createEmployeeAccount.c; do
@ -39,7 +34,7 @@ for file in employeeLogin.c createEmployeeAccount.c; do
done
gcc mainMenu.c error.c createEmployeeAccount.c showGeneralInfoEmployee.c employeeLogin.c createCustomer.c helperFunctions.c loginCustomer.c customerMenu.c main.c calculatorAdd.c calculatorDivide.c calculatorFactorial.c calculatorGetUserInput.c calculatorGetUserInputFactorial.c calculatorMultiply.c calculatorSubtract.c displayMenuCalculator.c -o main
gcc mainMenu.c error.c createEmployeeAccount.c showGeneralInfoEmployee.c employeeLogin.c createCustomer.c helperFunctions.c loginCustomer.c customerMenu.c main.c calculatorAdd.c calculatorDivide.c calculatorFactorial.c calculatorGetUserInput.c calculatorGetUserInputFactorial.c calculatorMultiply.c calculatorSubtract.c displayMenuCalculator.c requestLoan.c -o main
./main
rm main

3
project.yml

@ -49,7 +49,8 @@
- src/calculatorGetUserInputFactorial.*
- src/calculatorMultiply.*
- src/calculatorSubtract.*
- src/displazMenuCalculator.*
- src/displayMenuCalculator.*
- src/requestLoan.*
:support:
- tests/support
:libraries: []

7
src/CustomerData.txt

@ -0,0 +1,7 @@
4675275=1234
ID=4675275
Forename=Frank
Surname=Burkhardt
Password=1234
Balance=50.0000€

2
src/customerMenu.c

@ -22,7 +22,7 @@ int customerChoiceForMenuItem(int numberOfMenuItem)
case 4:
puts("You have chosen to request a loan.\n");
returnStatus = 4;
//call requestLoan();
requestLoan();
break;
default:
puts("Invalid input.");

1
src/customerMenu.h

@ -1,6 +1,7 @@
#include <stdio.h>
#include <stdlib.h>
#include "customerProperties.h"
#include "requestLoan.h"
int customerChoiceForMenuItem(int);
void showAllMenuEntries();
void menu(customer_t *);

83
src/employeesCredentialsList.txt

@ -9,86 +9,3 @@ Julius Insertcatfdai7057
Mohamed MDfdai6618
Shivam Schivam007fdlt3781
210960 fdai7207.

56
src/employeesData.txt

@ -32,59 +32,3 @@ Name : Shivam
Last name : Chaudhary
Adress : Fulda,leipzigerstrasse,6
Phone number : +4918756871384

29
src/requestLoan.c

@ -0,0 +1,29 @@
#include "requestLoan.h"
const int a = 1;
int option1 = 1000;
int option2 = 2500;
int option3 = 5000;
char currency[] = "Euro";
int allow() //int allow() is helpful for indirectly testing void requestLoan()
{
if (a == 1)
{
return 1;
}
}
void requestLoan()
{
if (allow() == 1) //only if int allow() returns 1, void requestLoan() will display the desired output
{
printf(" Please select a loan Package: \n");
printf(" \n");
printf(" \n");
printf(" %d %s\n", option1, currency);
printf(" %d %s\n", option2, currency);
printf(" %d %s\n", option3, currency);
}
}

5
src/requestLoan.h

@ -0,0 +1,5 @@
#include <stdio.h>
#include <stdlib.h>
void requestLoan();
int allow();

9
team.md

@ -1,9 +0,0 @@
# Bankmanagement-System
- Can Hacioglu, Fdlt3817
- Atharva Kishor Naik, fdai7514
- Julius Philipp Engel, fdai7057
- Shivam Chaudhary, fdlt3781
- Mohamed Yahya Dahi, fdai6618
- Haytham Daoula, fdai7207

1
tests/test_CustomerMenu.c

@ -1,5 +1,6 @@
#include <unity.h>
#include "../src/customerMenu.c"
#include "../src/requestLoan.c"
void test_customerChoiceForMenuEntry()
{

1
tests/test_LoginCustomer.c

@ -2,6 +2,7 @@
#include "../src/loginCustomer.c"
#include "../src/customerMenu.c"
#include "../src/helperFunctions.c"
#include "../src/requestLoan.c"
#include "../src/error.c"
void setUp(){};
void tearDown(){};

1
tests/test_mainMenu.c

@ -20,6 +20,7 @@
#include "../src/calculatorMultiply.c"
#include "../src/calculatorSubtract.c"
#include "../src/displayMenuCalculator.c"
#include "../src/requestLoan.c"
void setUp(void)

23
tests/test_requestLoan.c

@ -0,0 +1,23 @@
#ifdef TEST
#include "unity.h"
#include "../src/requestLoan.c"
void setUp(void)
{
}
void tearDown(void)
{
}
void test_requestLoan(void)
{
int actual, expected; //Arrange
expected = 1;
actual = allow(); // Act
TEST_ASSERT_EQUAL_INT(expected, actual); // Assert
}
#endif // TEST
Loading…
Cancel
Save