From 7c7e43a11f43f909d45ef5ccc394498d55d73a18 Mon Sep 17 00:00:00 2001 From: Enrico Schellenberger Date: Wed, 31 Jan 2024 11:24:49 +0100 Subject: [PATCH 001/125] added minus function --- src/main/c/main_taschenrechner.c | 4 ++++ src/main/c/taschenrechner.h | 2 ++ 2 files changed, 6 insertions(+) diff --git a/src/main/c/main_taschenrechner.c b/src/main/c/main_taschenrechner.c index 79ece02..9727e18 100644 --- a/src/main/c/main_taschenrechner.c +++ b/src/main/c/main_taschenrechner.c @@ -10,3 +10,7 @@ int add(int a, int b) { return a+b; } + +int minus (int a, int b){ + return a - b; +} diff --git a/src/main/c/taschenrechner.h b/src/main/c/taschenrechner.h index 1261fd7..0ebc004 100644 --- a/src/main/c/taschenrechner.h +++ b/src/main/c/taschenrechner.h @@ -3,4 +3,6 @@ int add(int a, int b); +int minus(int a, int b); + #endif // TASCHENRECHNER_H From 2088b143b6b6f4e2ac2e1b5fb9364a7781641521 Mon Sep 17 00:00:00 2001 From: Enrico Schellenberger Date: Wed, 31 Jan 2024 11:33:20 +0100 Subject: [PATCH 002/125] added multiply function --- src/main/c/main_taschenrechner.c | 4 ++++ src/main/c/taschenrechner.h | 2 ++ 2 files changed, 6 insertions(+) diff --git a/src/main/c/main_taschenrechner.c b/src/main/c/main_taschenrechner.c index 9727e18..cec5d6f 100644 --- a/src/main/c/main_taschenrechner.c +++ b/src/main/c/main_taschenrechner.c @@ -14,3 +14,7 @@ int add(int a, int b) { int minus (int a, int b){ return a - b; } + +int multiply(int a, int b) { + return a * b; +} diff --git a/src/main/c/taschenrechner.h b/src/main/c/taschenrechner.h index 0ebc004..e1ca752 100644 --- a/src/main/c/taschenrechner.h +++ b/src/main/c/taschenrechner.h @@ -5,4 +5,6 @@ int add(int a, int b); int minus(int a, int b); +int multiply(int a, int b); + #endif // TASCHENRECHNER_H From 0c9b2290c4a16a0c9f6e5c4453f3d3aa014ed3c7 Mon Sep 17 00:00:00 2001 From: Enrico Schellenberger Date: Wed, 31 Jan 2024 11:39:42 +0100 Subject: [PATCH 003/125] added divide function --- src/main/c/main_taschenrechner.c | 6 ++++-- src/main/c/taschenrechner.h | 2 ++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/main/c/main_taschenrechner.c b/src/main/c/main_taschenrechner.c index cec5d6f..74668c7 100644 --- a/src/main/c/main_taschenrechner.c +++ b/src/main/c/main_taschenrechner.c @@ -6,9 +6,7 @@ int add(int a, int b) { - return a+b; - } int minus (int a, int b){ @@ -18,3 +16,7 @@ int minus (int a, int b){ int multiply(int a, int b) { return a * b; } + +int divide(int a, int b) { + return a / b; +} diff --git a/src/main/c/taschenrechner.h b/src/main/c/taschenrechner.h index e1ca752..3147d9d 100644 --- a/src/main/c/taschenrechner.h +++ b/src/main/c/taschenrechner.h @@ -7,4 +7,6 @@ int minus(int a, int b); int multiply(int a, int b); +int divide(int a, int b); + #endif // TASCHENRECHNER_H From 0649393e9383ad67e3e40fb5beaf8a7f1b9b84fd Mon Sep 17 00:00:00 2001 From: fdai7782 Date: Thu, 1 Feb 2024 12:03:47 +0000 Subject: [PATCH 004/125] Added calculator modes functionality --- src/main/c/main_taschenrechner.c | 28 ++++++++++++++++++++++++++++ src/main/c/taschenrechner.h | 2 ++ 2 files changed, 30 insertions(+) diff --git a/src/main/c/main_taschenrechner.c b/src/main/c/main_taschenrechner.c index 74668c7..d4549dc 100644 --- a/src/main/c/main_taschenrechner.c +++ b/src/main/c/main_taschenrechner.c @@ -20,3 +20,31 @@ int multiply(int a, int b) { int divide(int a, int b) { return a / b; } + +int mode(int userChoice){ + + switch(userChoice) { + + case 1:return 1; // Basic mode + break; + + case 2:return 2; // Scientific mode (Trigonomertic functions, Logarithm and exponential functions.) + break; + + case 3:return 3; // Graph mode (Draw and visualize functions.) + break; + + case 4:return 4; // Programming mode (Binary , octal and hexadecimal ) + break; + + case 5:return 5; // Unit converter mode (length, weight volume etc.) + break; + + case 0: return 0; // printf("Exiting the calculator.\n"); + break; + + default: return -1; // printf("Invalid choice. Please try again.\n"); + + } + +} \ No newline at end of file diff --git a/src/main/c/taschenrechner.h b/src/main/c/taschenrechner.h index 3147d9d..d410b22 100644 --- a/src/main/c/taschenrechner.h +++ b/src/main/c/taschenrechner.h @@ -9,4 +9,6 @@ int multiply(int a, int b); int divide(int a, int b); +int mode(int userChoice); + #endif // TASCHENRECHNER_H From c9c519066287ff1d73cf06f38d11087237b9c7d3 Mon Sep 17 00:00:00 2001 From: fdai7782 Date: Thu, 1 Feb 2024 12:26:57 +0000 Subject: [PATCH 005/125] Added display menu functionality --- src/main/c/main_taschenrechner.c | 18 +++++++++++++++++- src/main/c/taschenrechner.h | 2 ++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/src/main/c/main_taschenrechner.c b/src/main/c/main_taschenrechner.c index d4549dc..c64ab30 100644 --- a/src/main/c/main_taschenrechner.c +++ b/src/main/c/main_taschenrechner.c @@ -6,7 +6,7 @@ int add(int a, int b) { - return a+b; + return a + b; } int minus (int a, int b){ @@ -47,4 +47,20 @@ int mode(int userChoice){ } +} + + +// display the mode options: + +int displayMenu(){ + + printf("\nCalculator Modes: \n"); + printf("\n1: Basic Mode\n"); + printf("\n2: Scientific Mode (Trigonomertic functions, Logarithm and exponential functions.)\n"); + printf("\n3: Graph Mode (Draw and visualize functions.)\n"); + printf("\n4: Programming Mode (Binary , octal and hexadecimal )\n"); + printf("\n5: Unit converter Mode (length, weight volume etc.)\n"); + printf("\n0: Exit calculator\n"); + + return 1; // return 1 to check if the function works } \ No newline at end of file diff --git a/src/main/c/taschenrechner.h b/src/main/c/taschenrechner.h index d410b22..5bbfe6b 100644 --- a/src/main/c/taschenrechner.h +++ b/src/main/c/taschenrechner.h @@ -11,4 +11,6 @@ int divide(int a, int b); int mode(int userChoice); +int displayMenu(); + #endif // TASCHENRECHNER_H From 7a88cae1230b61928fe1601be2e74e2a2495cf28 Mon Sep 17 00:00:00 2001 From: fdai7782 Date: Thu, 1 Feb 2024 14:11:00 +0000 Subject: [PATCH 006/125] Added scientificMode function with user input (no functionality yet) --- src/main/c/main_taschenrechner.c | 46 ++++++++++++++++++++++++++++++-- 1 file changed, 44 insertions(+), 2 deletions(-) diff --git a/src/main/c/main_taschenrechner.c b/src/main/c/main_taschenrechner.c index c64ab30..526d9e9 100644 --- a/src/main/c/main_taschenrechner.c +++ b/src/main/c/main_taschenrechner.c @@ -1,6 +1,7 @@ #include -// #include +#include #include +#include #include "taschenrechner.h" @@ -21,6 +22,48 @@ int divide(int a, int b) { return a / b; } +// scientificmode + +int scientificmode(){ + + double num, result; + + int choice; + + printf("Enter a number: "); + + scanf("%lf", &num); // scan the number from user + + printf("Scientific mode Options:\n"); + printf("1: Square root:\n"); + printf("2: Exponential:\n"); + printf("2: Logarithm:\n"); + printf("4: Trigonomertic"); + scanf("%d", &choice); // user choice + + switch(choice) { + + case 1: // Square root + break; + + case 2: // Exponential + break; + + case 3: // Logarithm + break; + + case 4: // Trigonomertic + break; + + default: printf("Invalid choice. Please try again.\n"); + + } + + return result; +} + + +// change mode int mode(int userChoice){ switch(userChoice) { @@ -51,7 +94,6 @@ int mode(int userChoice){ // display the mode options: - int displayMenu(){ printf("\nCalculator Modes: \n"); From 97217b687c733aaa5de1cb297cb92b0b69c0f12a Mon Sep 17 00:00:00 2001 From: fdai7782 Date: Thu, 1 Feb 2024 19:20:11 +0000 Subject: [PATCH 007/125] Added graph mode for testing with basic sin function table --- src/main/c/main_taschenrechner.c | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/src/main/c/main_taschenrechner.c b/src/main/c/main_taschenrechner.c index 526d9e9..7645288 100644 --- a/src/main/c/main_taschenrechner.c +++ b/src/main/c/main_taschenrechner.c @@ -22,9 +22,10 @@ int divide(int a, int b) { return a / b; } +// // scientificmode -int scientificmode(){ +int scientificMode(){ double num, result; @@ -62,6 +63,25 @@ int scientificmode(){ return result; } +// graphMode +void graphMode() { + double x, y; + + printf("Enter the range for x (start end step): "); + double x_start, x_end, x_step; + scanf("%lf %lf %lf", &x_start, &x_end, &x_step); + + printf("\nGraph for the function y = sin(x):\n"); + + printf(" x\t| y\n"); + printf("--------------\n"); + + for (x = x_start; x <= x_end; x += x_step) { + y = sin(x); + printf("%.2lf\t| %.2lf\n", x, y); + } +} + // change mode int mode(int userChoice){ From 550fe3158208681bb3dbc17f156b1f3ae206e45c Mon Sep 17 00:00:00 2001 From: fdai7782 Date: Thu, 1 Feb 2024 21:07:36 +0000 Subject: [PATCH 008/125] Added programming mode without functionality --- src/main/c/main_taschenrechner.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/main/c/main_taschenrechner.c b/src/main/c/main_taschenrechner.c index 7645288..574ad40 100644 --- a/src/main/c/main_taschenrechner.c +++ b/src/main/c/main_taschenrechner.c @@ -82,6 +82,24 @@ void graphMode() { } } +// Programming mode + +void programmingMode() { + + int num1, num2, result; + char operator; + + printf("Enter first integer: "); + scanf("%d", &num1); + + printf("Enter operator (+, -, *, /): "); + scanf(" %c", &operator); + + printf("Enter second integer: "); + scanf("%d", &num2); + +} + // change mode int mode(int userChoice){ From 1b98800df7ab1fd922ebcc19409153e328bc7274 Mon Sep 17 00:00:00 2001 From: fdai7782 Date: Thu, 1 Feb 2024 21:15:38 +0000 Subject: [PATCH 009/125] Added Unit Converter mode without functionality --- src/main/c/main_taschenrechner.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/src/main/c/main_taschenrechner.c b/src/main/c/main_taschenrechner.c index 574ad40..60e57f1 100644 --- a/src/main/c/main_taschenrechner.c +++ b/src/main/c/main_taschenrechner.c @@ -22,7 +22,7 @@ int divide(int a, int b) { return a / b; } -// + // scientificmode int scientificMode(){ @@ -100,6 +100,23 @@ void programmingMode() { } +// Unit converter mode + +void unitConverterMode() { + int choice; + double value, result; + + printf("Unit Converter Mode:\n"); + printf("1. Meter to Kilometer\n"); + printf("2. Kilogram to Gram\n"); + printf("3. Celsius to Fahrenheit\n"); + printf("Enter your choice: "); + scanf("%d", &choice); + + printf("Enter the value to convert: "); + scanf("%lf", &value); + +} // change mode int mode(int userChoice){ From 8d69bf6c8ff17a3467b228cb6c6215dc95c7c345 Mon Sep 17 00:00:00 2001 From: fdai7782 Date: Fri, 2 Feb 2024 15:18:30 +0000 Subject: [PATCH 010/125] Added sineFunction for trigonometric calculations --- src/main/c/main_taschenrechner.c | 6 ++++++ src/main/c/taschenrechner.h | 2 ++ 2 files changed, 8 insertions(+) diff --git a/src/main/c/main_taschenrechner.c b/src/main/c/main_taschenrechner.c index 60e57f1..f407180 100644 --- a/src/main/c/main_taschenrechner.c +++ b/src/main/c/main_taschenrechner.c @@ -22,6 +22,12 @@ int divide(int a, int b) { return a / b; } +// Trigonometric functions +double sineFunction(double angle) { + // Convert degrees to radians for trigonometric functions + return sin(angle * M_PI / 180.0); +} + // scientificmode diff --git a/src/main/c/taschenrechner.h b/src/main/c/taschenrechner.h index 5bbfe6b..1ca10c6 100644 --- a/src/main/c/taschenrechner.h +++ b/src/main/c/taschenrechner.h @@ -9,6 +9,8 @@ int multiply(int a, int b); int divide(int a, int b); +double sineFunction(double angle); + int mode(int userChoice); int displayMenu(); From 5e548b90e558e2a3a232706fc7ee42cf4aa7e20f Mon Sep 17 00:00:00 2001 From: fdai7782 Date: Fri, 2 Feb 2024 15:21:46 +0000 Subject: [PATCH 011/125] Added cosine function for trigonometric calculations --- src/main/c/main_taschenrechner.c | 6 ++++++ src/main/c/taschenrechner.h | 2 ++ 2 files changed, 8 insertions(+) diff --git a/src/main/c/main_taschenrechner.c b/src/main/c/main_taschenrechner.c index f407180..d99a933 100644 --- a/src/main/c/main_taschenrechner.c +++ b/src/main/c/main_taschenrechner.c @@ -29,6 +29,12 @@ double sineFunction(double angle) { } +double cosineFunction(double angle) { + // Convert degrees to radians for trigonometric functions + return cos(angle * M_PI / 180.0); +} + + // scientificmode int scientificMode(){ diff --git a/src/main/c/taschenrechner.h b/src/main/c/taschenrechner.h index 1ca10c6..a5b9d40 100644 --- a/src/main/c/taschenrechner.h +++ b/src/main/c/taschenrechner.h @@ -11,6 +11,8 @@ int divide(int a, int b); double sineFunction(double angle); +double cosineFunction(double angle); + int mode(int userChoice); int displayMenu(); From 51fe20da4ff82dffd8784b79772fa0388c836efa Mon Sep 17 00:00:00 2001 From: fdai7782 Date: Fri, 2 Feb 2024 15:24:34 +0000 Subject: [PATCH 012/125] Added tangent function for trigonometric calculations --- src/main/c/main_taschenrechner.c | 4 ++++ src/main/c/taschenrechner.h | 2 ++ 2 files changed, 6 insertions(+) diff --git a/src/main/c/main_taschenrechner.c b/src/main/c/main_taschenrechner.c index d99a933..20b7c33 100644 --- a/src/main/c/main_taschenrechner.c +++ b/src/main/c/main_taschenrechner.c @@ -34,6 +34,10 @@ double cosineFunction(double angle) { return cos(angle * M_PI / 180.0); } +double tangentFunction(double angle) { + // Convert degrees to radians for trigonometric functions + return tan(angle * M_PI / 180.0); +} // scientificmode diff --git a/src/main/c/taschenrechner.h b/src/main/c/taschenrechner.h index a5b9d40..a2b16d0 100644 --- a/src/main/c/taschenrechner.h +++ b/src/main/c/taschenrechner.h @@ -13,6 +13,8 @@ double sineFunction(double angle); double cosineFunction(double angle); +double tangentFunction(double angle); + int mode(int userChoice); int displayMenu(); From 0a09383b1eefad0baab83cb424b072538e95572e Mon Sep 17 00:00:00 2001 From: fdai7782 Date: Fri, 2 Feb 2024 15:27:26 +0000 Subject: [PATCH 013/125] Added logarithm function for base 10 logarithmic calculations --- src/main/c/main_taschenrechner.c | 9 ++++++++- src/main/c/taschenrechner.h | 2 ++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/main/c/main_taschenrechner.c b/src/main/c/main_taschenrechner.c index 20b7c33..9158895 100644 --- a/src/main/c/main_taschenrechner.c +++ b/src/main/c/main_taschenrechner.c @@ -39,8 +39,15 @@ double tangentFunction(double angle) { return tan(angle * M_PI / 180.0); } -// scientificmode +// Logarithmic functions +double logarithmFunction(double x) { + // Logarithm with base 10 + return log10(x); +} + + +// scientificmode int scientificMode(){ double num, result; diff --git a/src/main/c/taschenrechner.h b/src/main/c/taschenrechner.h index a2b16d0..d177979 100644 --- a/src/main/c/taschenrechner.h +++ b/src/main/c/taschenrechner.h @@ -15,6 +15,8 @@ double cosineFunction(double angle); double tangentFunction(double angle); +double logarithmFunction(double x); + int mode(int userChoice); int displayMenu(); From 4e07ded997065a63883a9273cc4062011433136b Mon Sep 17 00:00:00 2001 From: fdai7782 Date: Fri, 2 Feb 2024 15:33:23 +0000 Subject: [PATCH 014/125] Added naturalLogarithmFunction (ln) for natural logarithmic calculations --- src/main/c/main_taschenrechner.c | 5 +++++ src/main/c/taschenrechner.h | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/src/main/c/main_taschenrechner.c b/src/main/c/main_taschenrechner.c index 9158895..eb9dad3 100644 --- a/src/main/c/main_taschenrechner.c +++ b/src/main/c/main_taschenrechner.c @@ -44,6 +44,11 @@ double logarithmFunction(double x) { // Logarithm with base 10 return log10(x); } + +double naturalLogarithmFunction(double x) { + // Natural logarithm (ln) + return log(x); +} diff --git a/src/main/c/taschenrechner.h b/src/main/c/taschenrechner.h index d177979..071fba0 100644 --- a/src/main/c/taschenrechner.h +++ b/src/main/c/taschenrechner.h @@ -9,14 +9,19 @@ int multiply(int a, int b); int divide(int a, int b); +// Trigonometric functions double sineFunction(double angle); double cosineFunction(double angle); double tangentFunction(double angle); +//.. +// Logarithmic functions double logarithmFunction(double x); +double naturalLogarithmFunction(double x); + int mode(int userChoice); int displayMenu(); From 03d5c29ff670d1179098b89ca93ad5a8a24ce5e3 Mon Sep 17 00:00:00 2001 From: fdai7782 Date: Fri, 2 Feb 2024 15:40:57 +0000 Subject: [PATCH 015/125] Added logarithmBase2Function for base 2 logarithmic calculations --- src/main/c/main_taschenrechner.c | 6 +++++- src/main/c/taschenrechner.h | 2 ++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/main/c/main_taschenrechner.c b/src/main/c/main_taschenrechner.c index eb9dad3..6820e7f 100644 --- a/src/main/c/main_taschenrechner.c +++ b/src/main/c/main_taschenrechner.c @@ -39,6 +39,7 @@ double tangentFunction(double angle) { return tan(angle * M_PI / 180.0); } +//.. // Logarithmic functions double logarithmFunction(double x) { // Logarithm with base 10 @@ -49,8 +50,11 @@ double naturalLogarithmFunction(double x) { // Natural logarithm (ln) return log(x); } - +double logarithmBase2Function(double x) { + // Logarithm with base 2 + return log2(x); +} // scientificmode int scientificMode(){ diff --git a/src/main/c/taschenrechner.h b/src/main/c/taschenrechner.h index 071fba0..1032900 100644 --- a/src/main/c/taschenrechner.h +++ b/src/main/c/taschenrechner.h @@ -22,6 +22,8 @@ double logarithmFunction(double x); double naturalLogarithmFunction(double x); +double logarithmBase2Function(double x); + int mode(int userChoice); int displayMenu(); From 440d7f5c25c789879bdf5517b1709a38a38dafca Mon Sep 17 00:00:00 2001 From: fdai7782 Date: Fri, 2 Feb 2024 15:43:33 +0000 Subject: [PATCH 016/125] Added exponentialFunction for exponential calculations --- src/main/c/main_taschenrechner.c | 7 +++++++ src/main/c/taschenrechner.h | 4 ++++ 2 files changed, 11 insertions(+) diff --git a/src/main/c/main_taschenrechner.c b/src/main/c/main_taschenrechner.c index 6820e7f..fe59f96 100644 --- a/src/main/c/main_taschenrechner.c +++ b/src/main/c/main_taschenrechner.c @@ -55,6 +55,13 @@ double logarithmBase2Function(double x) { // Logarithm with base 2 return log2(x); } +//.. +// Exponential function +double exponentialFunction(double x) { + // Exponential function (e^x) + return exp(x); +} + // scientificmode int scientificMode(){ diff --git a/src/main/c/taschenrechner.h b/src/main/c/taschenrechner.h index 1032900..17f2ce2 100644 --- a/src/main/c/taschenrechner.h +++ b/src/main/c/taschenrechner.h @@ -24,6 +24,10 @@ double naturalLogarithmFunction(double x); double logarithmBase2Function(double x); +//.. +// Exponential function +double exponentialFunction(double x); + int mode(int userChoice); int displayMenu(); From 08980879044d5fe5885dfab94b44a15eccfb4844 Mon Sep 17 00:00:00 2001 From: fdai7782 Date: Fri, 2 Feb 2024 15:55:05 +0000 Subject: [PATCH 017/125] Added bitwiseAND function for bitwise AND operation --- src/main/c/main_taschenrechner.c | 5 +++++ src/main/c/taschenrechner.h | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/src/main/c/main_taschenrechner.c b/src/main/c/main_taschenrechner.c index fe59f96..e365a95 100644 --- a/src/main/c/main_taschenrechner.c +++ b/src/main/c/main_taschenrechner.c @@ -62,6 +62,11 @@ double exponentialFunction(double x) { return exp(x); } +// .. +// Bitwise AND function +int bitwiseAND(int num1, int num2) { + return num1 & num2; +} // scientificmode int scientificMode(){ diff --git a/src/main/c/taschenrechner.h b/src/main/c/taschenrechner.h index 17f2ce2..866141a 100644 --- a/src/main/c/taschenrechner.h +++ b/src/main/c/taschenrechner.h @@ -28,6 +28,10 @@ double logarithmBase2Function(double x); // Exponential function double exponentialFunction(double x); +// .. +// Bitwise AND function +int bitwiseAND(int num1, int num2); + int mode(int userChoice); int displayMenu(); From 0cc8033f3103513d6122cabfa6b245affcdfb5e6 Mon Sep 17 00:00:00 2001 From: fdai7782 Date: Fri, 2 Feb 2024 15:56:53 +0000 Subject: [PATCH 018/125] Added bitwiseOR function for bitwise OR operation --- src/main/c/main_taschenrechner.c | 6 ++++++ src/main/c/taschenrechner.h | 3 +++ 2 files changed, 9 insertions(+) diff --git a/src/main/c/main_taschenrechner.c b/src/main/c/main_taschenrechner.c index e365a95..e0bb699 100644 --- a/src/main/c/main_taschenrechner.c +++ b/src/main/c/main_taschenrechner.c @@ -68,6 +68,12 @@ int bitwiseAND(int num1, int num2) { return num1 & num2; } +// Bitwise OR function +int bitwiseOR(int num1, int num2) { + return num1 | num2; +} + + // scientificmode int scientificMode(){ diff --git a/src/main/c/taschenrechner.h b/src/main/c/taschenrechner.h index 866141a..b3cc747 100644 --- a/src/main/c/taschenrechner.h +++ b/src/main/c/taschenrechner.h @@ -32,6 +32,9 @@ double exponentialFunction(double x); // Bitwise AND function int bitwiseAND(int num1, int num2); +// Bitwise OR function +int bitwiseOR(int num1, int num2); + int mode(int userChoice); int displayMenu(); From 8993cdde83dfcd3fa9b1afd0bafe9975583d03e3 Mon Sep 17 00:00:00 2001 From: fdai7782 Date: Fri, 2 Feb 2024 15:59:18 +0000 Subject: [PATCH 019/125] Added bitwiseXOR function for bitwise XOR operation --- src/main/c/main_taschenrechner.c | 6 ++++++ src/main/c/taschenrechner.h | 3 +++ 2 files changed, 9 insertions(+) diff --git a/src/main/c/main_taschenrechner.c b/src/main/c/main_taschenrechner.c index e0bb699..d9bda36 100644 --- a/src/main/c/main_taschenrechner.c +++ b/src/main/c/main_taschenrechner.c @@ -73,6 +73,12 @@ int bitwiseOR(int num1, int num2) { return num1 | num2; } +// Bitwise XOR function +int bitwiseXOR(int num1, int num2) { + return num1 ^ num2; +} + +//.. // scientificmode int scientificMode(){ diff --git a/src/main/c/taschenrechner.h b/src/main/c/taschenrechner.h index b3cc747..76acfb3 100644 --- a/src/main/c/taschenrechner.h +++ b/src/main/c/taschenrechner.h @@ -35,6 +35,9 @@ int bitwiseAND(int num1, int num2); // Bitwise OR function int bitwiseOR(int num1, int num2); +// Bitwise XOR function +int bitwiseXOR(int num1, int num2); + int mode(int userChoice); int displayMenu(); From 1a2e13f0c74a65bef60b88425037d4eff3cd7d1d Mon Sep 17 00:00:00 2001 From: fdai7782 Date: Fri, 2 Feb 2024 16:03:53 +0000 Subject: [PATCH 020/125] Added squareRootFunction for calculating square roots --- src/main/c/main_taschenrechner.c | 7 +++++++ src/main/c/taschenrechner.h | 4 ++++ 2 files changed, 11 insertions(+) diff --git a/src/main/c/main_taschenrechner.c b/src/main/c/main_taschenrechner.c index d9bda36..af494d1 100644 --- a/src/main/c/main_taschenrechner.c +++ b/src/main/c/main_taschenrechner.c @@ -22,6 +22,13 @@ int divide(int a, int b) { return a / b; } +// Square root function +double squareRootFunction(double x) { + // Using the sqrt function from math.h + return sqrt(x); +} + +//.. // Trigonometric functions double sineFunction(double angle) { // Convert degrees to radians for trigonometric functions diff --git a/src/main/c/taschenrechner.h b/src/main/c/taschenrechner.h index 76acfb3..1053da9 100644 --- a/src/main/c/taschenrechner.h +++ b/src/main/c/taschenrechner.h @@ -9,6 +9,10 @@ int multiply(int a, int b); int divide(int a, int b); +// Square root function +double squareRootFunction(double x); + +//.. // Trigonometric functions double sineFunction(double angle); From b35930f9c55928361b96e762a32ba94e67a1a855 Mon Sep 17 00:00:00 2001 From: lukazieg <2003lukas.zie@gmail.com> Date: Sat, 3 Feb 2024 11:24:06 +0100 Subject: [PATCH 021/125] added testForNumber.c --- src/main/c/testForNumber.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 src/main/c/testForNumber.c diff --git a/src/main/c/testForNumber.c b/src/main/c/testForNumber.c new file mode 100644 index 0000000..89784ed --- /dev/null +++ b/src/main/c/testForNumber.c @@ -0,0 +1,23 @@ +double testForNumber() { + double num; + char storage[25]; + char* notANumber; + + do { + //Emptys the standart output buffer to ensure that this function works in loops + //and returns the value of num after every loop + fflush(stdout); + + //fgets() reads the user input into the buffer storage (storage) + //the if condition is true as long as the input isn't empty + if (fgets(storage, sizeof storage, stdin) != NULL) { + //strtod() tries to convert the input into a double + //if there is anything but a number at any point of the array the pointer notANumber will point to this position + num = strtod(storage, ¬ANumber); + } + //isspace makes sure that notANumber doesn't point to an empty space + //the secount part makes sure that notANumber isn't pointing at 0 + } while (!isspace(*notANumber) && *notANumber != 0); + + return num; +} \ No newline at end of file From 944e3a15446f334563f26ff008fc9c9ccf3f4d61 Mon Sep 17 00:00:00 2001 From: Enrico Schellenberger Date: Sat, 3 Feb 2024 11:56:50 +0100 Subject: [PATCH 022/125] unit tests added and adjusted calculations with double --- src/main/c/main_taschenrechner.c | 11 +++++++---- src/main/c/taschenrechner.h | 8 ++++---- src/test/c/test_taschenrechner.c | 27 +++++++++++++++++++++------ 3 files changed, 32 insertions(+), 14 deletions(-) diff --git a/src/main/c/main_taschenrechner.c b/src/main/c/main_taschenrechner.c index af494d1..f1fccac 100644 --- a/src/main/c/main_taschenrechner.c +++ b/src/main/c/main_taschenrechner.c @@ -6,19 +6,22 @@ #include "taschenrechner.h" -int add(int a, int b) { +doulbe add(doulbe a, doulbe b) { return a + b; } -int minus (int a, int b){ +doulbe minus (doulbe a, doulbe b){ return a - b; } -int multiply(int a, int b) { +doulbe multiply(doulbe a, doulbe b) { return a * b; } -int divide(int a, int b) { +doulbe divide(doulbe a, doulbe b) { + if (b == 0) { + return 0; + } return a / b; } diff --git a/src/main/c/taschenrechner.h b/src/main/c/taschenrechner.h index 1053da9..7b548f9 100644 --- a/src/main/c/taschenrechner.h +++ b/src/main/c/taschenrechner.h @@ -1,13 +1,13 @@ #ifndef TASCHENRECHNER_H #define TASCHENRECHNER_H -int add(int a, int b); +doulbe add(doulbe a, doulbe b); -int minus(int a, int b); +doulbe minus(doulbe a, doulbe b); -int multiply(int a, int b); +doulbe multiply(doulbe a, doulbe b); -int divide(int a, int b); +doulbe divide(doulbe a, doulbe b); // Square root function double squareRootFunction(double x); diff --git a/src/test/c/test_taschenrechner.c b/src/test/c/test_taschenrechner.c index d3fc8c9..6ad4cc7 100644 --- a/src/test/c/test_taschenrechner.c +++ b/src/test/c/test_taschenrechner.c @@ -14,14 +14,29 @@ void tearDown(void) void test_addition(void) { - /* arrange */ - char* result; - char expected[] = "2\n"; + doulbe result = add(1, 2); + TEST_ASSERT_EQUAL(3, result); +} + +void test_minus(void) +{ + doulbe result = minus(3, 1); + TEST_ASSERT_EQUAL(2, result); +} - /* act */ - result = convert(2); +void test_multiply(void) +{ + doulbe result = multiply(1, 2); + TEST_ASSERT_EQUAL(2, result); +} + +void test_divide(void) +{ + doulbe result = divide(4, 2); + TEST_ASSERT_EQUAL(2, result); - /* assert */ + doulbe result1 = divide(4, 0); + TEST_ASSERT_EQUAL(0, result1); } #endif // TEST From 0d247eb1cdedc67f60a1272fffa9fd0637c30428 Mon Sep 17 00:00:00 2001 From: Enrico Schellenberger Date: Sat, 3 Feb 2024 12:28:31 +0100 Subject: [PATCH 023/125] added test to develop branch --- src/test/c/test_taschenrechner.c | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/src/test/c/test_taschenrechner.c b/src/test/c/test_taschenrechner.c index d3fc8c9..6ad4cc7 100644 --- a/src/test/c/test_taschenrechner.c +++ b/src/test/c/test_taschenrechner.c @@ -14,14 +14,29 @@ void tearDown(void) void test_addition(void) { - /* arrange */ - char* result; - char expected[] = "2\n"; + doulbe result = add(1, 2); + TEST_ASSERT_EQUAL(3, result); +} + +void test_minus(void) +{ + doulbe result = minus(3, 1); + TEST_ASSERT_EQUAL(2, result); +} - /* act */ - result = convert(2); +void test_multiply(void) +{ + doulbe result = multiply(1, 2); + TEST_ASSERT_EQUAL(2, result); +} + +void test_divide(void) +{ + doulbe result = divide(4, 2); + TEST_ASSERT_EQUAL(2, result); - /* assert */ + doulbe result1 = divide(4, 0); + TEST_ASSERT_EQUAL(0, result1); } #endif // TEST From 76616df9af6c2d3629e93480193f6dd4a98bd306 Mon Sep 17 00:00:00 2001 From: Enrico Schellenberger Date: Sat, 3 Feb 2024 12:44:01 +0100 Subject: [PATCH 024/125] adjusted files main_taschenrechner.c , taschenrechner.h --- src/main/c/main_taschenrechner.c | 223 ++++++++++++++++++++++++++++++- src/main/c/taschenrechner.h | 45 ++++++- 2 files changed, 264 insertions(+), 4 deletions(-) diff --git a/src/main/c/main_taschenrechner.c b/src/main/c/main_taschenrechner.c index 79ece02..f1fccac 100644 --- a/src/main/c/main_taschenrechner.c +++ b/src/main/c/main_taschenrechner.c @@ -1,12 +1,229 @@ #include -// #include +#include #include +#include #include "taschenrechner.h" -int add(int a, int b) { +doulbe add(doulbe a, doulbe b) { + return a + b; +} + +doulbe minus (doulbe a, doulbe b){ + return a - b; +} + +doulbe multiply(doulbe a, doulbe b) { + return a * b; +} + +doulbe divide(doulbe a, doulbe b) { + if (b == 0) { + return 0; + } + return a / b; +} + +// Square root function +double squareRootFunction(double x) { + // Using the sqrt function from math.h + return sqrt(x); +} + +//.. +// Trigonometric functions +double sineFunction(double angle) { + // Convert degrees to radians for trigonometric functions + return sin(angle * M_PI / 180.0); +} + + +double cosineFunction(double angle) { + // Convert degrees to radians for trigonometric functions + return cos(angle * M_PI / 180.0); +} + +double tangentFunction(double angle) { + // Convert degrees to radians for trigonometric functions + return tan(angle * M_PI / 180.0); +} + +//.. +// Logarithmic functions +double logarithmFunction(double x) { + // Logarithm with base 10 + return log10(x); +} + +double naturalLogarithmFunction(double x) { + // Natural logarithm (ln) + return log(x); +} + +double logarithmBase2Function(double x) { + // Logarithm with base 2 + return log2(x); +} +//.. +// Exponential function +double exponentialFunction(double x) { + // Exponential function (e^x) + return exp(x); +} + +// .. +// Bitwise AND function +int bitwiseAND(int num1, int num2) { + return num1 & num2; +} + +// Bitwise OR function +int bitwiseOR(int num1, int num2) { + return num1 | num2; +} + +// Bitwise XOR function +int bitwiseXOR(int num1, int num2) { + return num1 ^ num2; +} + +//.. + +// scientificmode +int scientificMode(){ + + double num, result; + + int choice; + + printf("Enter a number: "); + + scanf("%lf", &num); // scan the number from user - return a+b; + printf("Scientific mode Options:\n"); + printf("1: Square root:\n"); + printf("2: Exponential:\n"); + printf("2: Logarithm:\n"); + printf("4: Trigonomertic"); + scanf("%d", &choice); // user choice + + switch(choice) { + + case 1: // Square root + break; + + case 2: // Exponential + break; + + case 3: // Logarithm + break; + + case 4: // Trigonomertic + break; + default: printf("Invalid choice. Please try again.\n"); + + } + + return result; +} + +// graphMode +void graphMode() { + double x, y; + + printf("Enter the range for x (start end step): "); + double x_start, x_end, x_step; + scanf("%lf %lf %lf", &x_start, &x_end, &x_step); + + printf("\nGraph for the function y = sin(x):\n"); + + printf(" x\t| y\n"); + printf("--------------\n"); + + for (x = x_start; x <= x_end; x += x_step) { + y = sin(x); + printf("%.2lf\t| %.2lf\n", x, y); + } +} + +// Programming mode + +void programmingMode() { + + int num1, num2, result; + char operator; + + printf("Enter first integer: "); + scanf("%d", &num1); + + printf("Enter operator (+, -, *, /): "); + scanf(" %c", &operator); + + printf("Enter second integer: "); + scanf("%d", &num2); + +} + +// Unit converter mode + +void unitConverterMode() { + int choice; + double value, result; + + printf("Unit Converter Mode:\n"); + printf("1. Meter to Kilometer\n"); + printf("2. Kilogram to Gram\n"); + printf("3. Celsius to Fahrenheit\n"); + printf("Enter your choice: "); + scanf("%d", &choice); + + printf("Enter the value to convert: "); + scanf("%lf", &value); + } + +// change mode +int mode(int userChoice){ + + switch(userChoice) { + + case 1:return 1; // Basic mode + break; + + case 2:return 2; // Scientific mode (Trigonomertic functions, Logarithm and exponential functions.) + break; + + case 3:return 3; // Graph mode (Draw and visualize functions.) + break; + + case 4:return 4; // Programming mode (Binary , octal and hexadecimal ) + break; + + case 5:return 5; // Unit converter mode (length, weight volume etc.) + break; + + case 0: return 0; // printf("Exiting the calculator.\n"); + break; + + default: return -1; // printf("Invalid choice. Please try again.\n"); + + } + +} + + +// display the mode options: +int displayMenu(){ + + printf("\nCalculator Modes: \n"); + printf("\n1: Basic Mode\n"); + printf("\n2: Scientific Mode (Trigonomertic functions, Logarithm and exponential functions.)\n"); + printf("\n3: Graph Mode (Draw and visualize functions.)\n"); + printf("\n4: Programming Mode (Binary , octal and hexadecimal )\n"); + printf("\n5: Unit converter Mode (length, weight volume etc.)\n"); + printf("\n0: Exit calculator\n"); + + return 1; // return 1 to check if the function works +} \ No newline at end of file diff --git a/src/main/c/taschenrechner.h b/src/main/c/taschenrechner.h index 1261fd7..7b548f9 100644 --- a/src/main/c/taschenrechner.h +++ b/src/main/c/taschenrechner.h @@ -1,6 +1,49 @@ #ifndef TASCHENRECHNER_H #define TASCHENRECHNER_H -int add(int a, int b); +doulbe add(doulbe a, doulbe b); + +doulbe minus(doulbe a, doulbe b); + +doulbe multiply(doulbe a, doulbe b); + +doulbe divide(doulbe a, doulbe b); + +// Square root function +double squareRootFunction(double x); + +//.. +// Trigonometric functions +double sineFunction(double angle); + +double cosineFunction(double angle); + +double tangentFunction(double angle); + +//.. +// Logarithmic functions +double logarithmFunction(double x); + +double naturalLogarithmFunction(double x); + +double logarithmBase2Function(double x); + +//.. +// Exponential function +double exponentialFunction(double x); + +// .. +// Bitwise AND function +int bitwiseAND(int num1, int num2); + +// Bitwise OR function +int bitwiseOR(int num1, int num2); + +// Bitwise XOR function +int bitwiseXOR(int num1, int num2); + +int mode(int userChoice); + +int displayMenu(); #endif // TASCHENRECHNER_H From 8b6ad397fef77d124dcba0db124d4507963e4cae Mon Sep 17 00:00:00 2001 From: Enrico Schellenberger Date: Sat, 3 Feb 2024 12:49:17 +0100 Subject: [PATCH 025/125] added new File BasicMode.c for Basic calculations --- src/main/c/BasicMode.c | 9 +++++++++ src/main/c/main_taschenrechner.c | 1 + 2 files changed, 10 insertions(+) create mode 100644 src/main/c/BasicMode.c diff --git a/src/main/c/BasicMode.c b/src/main/c/BasicMode.c new file mode 100644 index 0000000..30a7779 --- /dev/null +++ b/src/main/c/BasicMode.c @@ -0,0 +1,9 @@ +#include +#include +#include +#include + +#include "taschenrechner.h" +#include "main_taschenrechner.c" + + diff --git a/src/main/c/main_taschenrechner.c b/src/main/c/main_taschenrechner.c index f1fccac..dbe0447 100644 --- a/src/main/c/main_taschenrechner.c +++ b/src/main/c/main_taschenrechner.c @@ -4,6 +4,7 @@ #include #include "taschenrechner.h" +#include "BasicMode.c" doulbe add(doulbe a, doulbe b) { From bd2e1ef19fc64af699107016105b8c6e08e6b815 Mon Sep 17 00:00:00 2001 From: Enrico Schellenberger Date: Sat, 3 Feb 2024 12:53:58 +0100 Subject: [PATCH 026/125] refractoring --- src/main/c/BasicMode.c | 1 - src/main/c/main_taschenrechner.c | 1 - src/main/c/taschenrechner.h | 7 +++++++ src/main/c/testForNumber.c | 7 +++++++ 4 files changed, 14 insertions(+), 2 deletions(-) diff --git a/src/main/c/BasicMode.c b/src/main/c/BasicMode.c index 30a7779..9904742 100644 --- a/src/main/c/BasicMode.c +++ b/src/main/c/BasicMode.c @@ -4,6 +4,5 @@ #include #include "taschenrechner.h" -#include "main_taschenrechner.c" diff --git a/src/main/c/main_taschenrechner.c b/src/main/c/main_taschenrechner.c index dbe0447..f1fccac 100644 --- a/src/main/c/main_taschenrechner.c +++ b/src/main/c/main_taschenrechner.c @@ -4,7 +4,6 @@ #include #include "taschenrechner.h" -#include "BasicMode.c" doulbe add(doulbe a, doulbe b) { diff --git a/src/main/c/taschenrechner.h b/src/main/c/taschenrechner.h index 7b548f9..23cc26f 100644 --- a/src/main/c/taschenrechner.h +++ b/src/main/c/taschenrechner.h @@ -1,14 +1,21 @@ #ifndef TASCHENRECHNER_H #define TASCHENRECHNER_H +//add function doulbe add(doulbe a, doulbe b); +//minus function doulbe minus(doulbe a, doulbe b); +//multiply function doulbe multiply(doulbe a, doulbe b); +//divide function doulbe divide(doulbe a, doulbe b); +//get input and check if its a number +double testForNumber() + // Square root function double squareRootFunction(double x); diff --git a/src/main/c/testForNumber.c b/src/main/c/testForNumber.c index 89784ed..06438d1 100644 --- a/src/main/c/testForNumber.c +++ b/src/main/c/testForNumber.c @@ -1,3 +1,10 @@ +#include +#include +#include +#include + +#include "taschenrechner.h" + double testForNumber() { double num; char storage[25]; From a3cbfd7de1d0f83a90f0822b5abb162180971f1f Mon Sep 17 00:00:00 2001 From: Enrico Schellenberger Date: Sat, 3 Feb 2024 16:59:42 +0100 Subject: [PATCH 027/125] added BasicMode.c and refractoring to testForOperator/taschenrechner.h --- src/main/c/BasicMode.c | 64 ++++++++++++++++--- src/main/c/taschenrechner.h | 115 ++++++++++++++++++----------------- src/main/c/testForOperator.c | 28 +++++++++ 3 files changed, 143 insertions(+), 64 deletions(-) create mode 100644 src/main/c/testForOperator.c diff --git a/src/main/c/BasicMode.c b/src/main/c/BasicMode.c index 9904742..396440f 100644 --- a/src/main/c/BasicMode.c +++ b/src/main/c/BasicMode.c @@ -1,8 +1,56 @@ -#include -#include -#include -#include - -#include "taschenrechner.h" - - +#include +#include +#include +#include + +#include "taschenrechner.h" + + +void BasicMode() { + char endtmp = '0'; //0 false, 1 true + double result = 0; + double numbers[100] = {0.0}; + char operatoren[100]; + + do { + //100 doubles in this array goes through the for loop till 100 numbers or = is entered + for (int i = 0; i < 100) { + printf("Enter a Number: "); + numbers[i] = testForNumber(); //gets number + + printf("Enter a operation: "); + operator[i] = testForOperator(); //gets operator + + if (i > 1) { //if function to prevent numbers[-1] + switch (operator[i]) //checks of the operator and switches to the case with the needed function + { + case '+': + result += add(numbers[i - 1], numbers[i]) + break; + + case '-': + result += minus(numbers[i - 1], numbers[i]) + break; + + case '*': + result += multiply(numbers[i - 1], numbers[i]) + break; + + case '/': + result += divide(numbers[i - 1], numbers[i]) + break; + + case '=': + printf("The result is: %d", result); + endtmp = 1; + break; + + default: + break; + } + } + i++; + } + } while (endtmp != '1') + +} diff --git a/src/main/c/taschenrechner.h b/src/main/c/taschenrechner.h index 23cc26f..3855a6c 100644 --- a/src/main/c/taschenrechner.h +++ b/src/main/c/taschenrechner.h @@ -1,56 +1,59 @@ -#ifndef TASCHENRECHNER_H -#define TASCHENRECHNER_H - -//add function -doulbe add(doulbe a, doulbe b); - -//minus function -doulbe minus(doulbe a, doulbe b); - -//multiply function -doulbe multiply(doulbe a, doulbe b); - -//divide function -doulbe divide(doulbe a, doulbe b); - -//get input and check if its a number -double testForNumber() - -// Square root function -double squareRootFunction(double x); - -//.. -// Trigonometric functions -double sineFunction(double angle); - -double cosineFunction(double angle); - -double tangentFunction(double angle); - -//.. -// Logarithmic functions -double logarithmFunction(double x); - -double naturalLogarithmFunction(double x); - -double logarithmBase2Function(double x); - -//.. -// Exponential function -double exponentialFunction(double x); - -// .. -// Bitwise AND function -int bitwiseAND(int num1, int num2); - -// Bitwise OR function -int bitwiseOR(int num1, int num2); - -// Bitwise XOR function -int bitwiseXOR(int num1, int num2); - -int mode(int userChoice); - -int displayMenu(); - -#endif // TASCHENRECHNER_H +#ifndef TASCHENRECHNER_H +#define TASCHENRECHNER_H + +//add function +doulbe add(doulbe a, doulbe b); + +//minus function +doulbe minus(doulbe a, doulbe b); + +//multiply function +doulbe multiply(doulbe a, doulbe b); + +//divide function +doulbe divide(doulbe a, doulbe b); + +//get input and check if its a number +double testForNumber() + +//get input and check if its a operator +char testForOperator() + +// Square root function +double squareRootFunction(double x); + +//.. +// Trigonometric functions +double sineFunction(double angle); + +double cosineFunction(double angle); + +double tangentFunction(double angle); + +//.. +// Logarithmic functions +double logarithmFunction(double x); + +double naturalLogarithmFunction(double x); + +double logarithmBase2Function(double x); + +//.. +// Exponential function +double exponentialFunction(double x); + +// .. +// Bitwise AND function +int bitwiseAND(int num1, int num2); + +// Bitwise OR function +int bitwiseOR(int num1, int num2); + +// Bitwise XOR function +int bitwiseXOR(int num1, int num2); + +int mode(int userChoice); + +int displayMenu(); + +#endif // TASCHENRECHNER_H diff --git a/src/main/c/testForOperator.c b/src/main/c/testForOperator.c new file mode 100644 index 0000000..51b1931 --- /dev/null +++ b/src/main/c/testForOperator.c @@ -0,0 +1,28 @@ +#include +#include +#include +#include + +#include "taschenrechner.h" + +char testForOperator() { + //saving the number of operators in a variable so it only needs to be changed in one location + int numberOfOperators = 5; + //array where all valid Operators are saved, can be esily expanded + char oppArray[numberOfOperators] = { '+','-','*','/','=' }; + char input; + bool validInput = false; + + //Loops as long as input isn't valid, enters at least one time + while (!validInput) { + scanf_s("%c\n", &input); + //checks every position of the array if a position is equal to input returns the input, which also stopps the function + for (int i = 0; i <= numberOfOperators; i++) { + if (input == oppArray[i]) { + return input; + } + } + //if the input was deemed invalid it asks for new input and goes to the top of the while loop + printf("Diese Eigabe war nicht zulässig probieren sie es noch einmal!\n"); + } +} \ No newline at end of file From 09e4f9d6b77c12f9925c0e7b049d83129d3a3d5f Mon Sep 17 00:00:00 2001 From: Enrico Schellenberger Date: Sat, 3 Feb 2024 17:40:32 +0100 Subject: [PATCH 028/125] changed BasicMode.c to priorities operators --- src/main/c/BasicMode.c | 62 ++++++++++++++++++++---------------------- 1 file changed, 30 insertions(+), 32 deletions(-) diff --git a/src/main/c/BasicMode.c b/src/main/c/BasicMode.c index 396440f..f68a11a 100644 --- a/src/main/c/BasicMode.c +++ b/src/main/c/BasicMode.c @@ -10,7 +10,7 @@ void BasicMode() { char endtmp = '0'; //0 false, 1 true double result = 0; double numbers[100] = {0.0}; - char operatoren[100]; + char operators[100]; do { //100 doubles in this array goes through the for loop till 100 numbers or = is entered @@ -19,38 +19,36 @@ void BasicMode() { numbers[i] = testForNumber(); //gets number printf("Enter a operation: "); - operator[i] = testForOperator(); //gets operator - - if (i > 1) { //if function to prevent numbers[-1] - switch (operator[i]) //checks of the operator and switches to the case with the needed function - { - case '+': - result += add(numbers[i - 1], numbers[i]) - break; - - case '-': - result += minus(numbers[i - 1], numbers[i]) - break; - - case '*': - result += multiply(numbers[i - 1], numbers[i]) - break; - - case '/': - result += divide(numbers[i - 1], numbers[i]) - break; - - case '=': - printf("The result is: %d", result); - endtmp = 1; - break; - - default: - break; - } - } - i++; + operators[i] = testForOperator(); //gets operator } } while (endtmp != '1') + + for (int i = 0; i < 100) {//checks all operators to check for priority + if ((operators[i] == '/' || operators[i] == '*') && i > 1) { //if operators[i] == / or * and i>1 so you dont get numbers[-1] + if (operators[i] == '/') { + result += divide(numbers[i - 1], numbers[i]); //divides if char is / and adds number to the result + } + // for all calculations we take the number and the number before that + else { // and do the operation + result += multiply(numbers[i - 1], numbers[i]); //multiplys if char is * and adds number to the result + } + } + + else if ((operators[i] == '+' || operators[i] == '-') && i > 1) { + if (operators[i] == '+') { + result += add(numbers[i - 1], numbers[i]); //adds if char is + and adds number to the result + } + + else { + result += minus(numbers[i - 1], numbers[i]); //subtrakts if char is - and adds number to the result + } + } + + else if (i<=1 && operator[i] == '=') { //if there are less then 2 numbers in the array + result = numbers[i]; //set result to the 0 digit + } + i++; + } + printf("The result is: %d", result); } From cc11e6eccd60ea42b1141f358abb9c643a1e6dfb Mon Sep 17 00:00:00 2001 From: Enrico Schellenberger Date: Sat, 3 Feb 2024 17:45:29 +0100 Subject: [PATCH 029/125] changed the last else if in BasicMode.c to include the = char --- src/main/c/BasicMode.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/c/BasicMode.c b/src/main/c/BasicMode.c index f68a11a..cfb5ded 100644 --- a/src/main/c/BasicMode.c +++ b/src/main/c/BasicMode.c @@ -48,7 +48,12 @@ void BasicMode() { else if (i<=1 && operator[i] == '=') { //if there are less then 2 numbers in the array result = numbers[i]; //set result to the 0 digit } + + else if (operator[i] == '=') { //if char is = + printf("The result is: %d", result); //print out the result + i = 100; + break; + } i++; } - printf("The result is: %d", result); } From cd40c3a9b40d0d5029383b23e995e2c65dd05a5e Mon Sep 17 00:00:00 2001 From: fdai7782 Date: Sun, 4 Feb 2024 15:12:40 +0000 Subject: [PATCH 030/125] Updated Ceedling YAML for project structure --- project.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/project.yml b/project.yml index dac0d93..a360bc3 100644 --- a/project.yml +++ b/project.yml @@ -34,7 +34,7 @@ - +:src/test/c/** - -:src/test/c/support :source: - - src/main/c/** + - +:src/main/c/** :support: - src/test/c/support :libraries: [] @@ -98,4 +98,3 @@ :enabled: - stdout_pretty_tests_report - module_generator -... From 06194527ea70cbb44b8c451fc467ccd50f437804 Mon Sep 17 00:00:00 2001 From: fdai7782 Date: Sun, 4 Feb 2024 15:16:02 +0000 Subject: [PATCH 031/125] Updated Ceedling YAML for project structure in develop branch --- project.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/project.yml b/project.yml index dac0d93..a360bc3 100644 --- a/project.yml +++ b/project.yml @@ -34,7 +34,7 @@ - +:src/test/c/** - -:src/test/c/support :source: - - src/main/c/** + - +:src/main/c/** :support: - src/test/c/support :libraries: [] @@ -98,4 +98,3 @@ :enabled: - stdout_pretty_tests_report - module_generator -... From ed3952a199900d04250bcc4a92dfbb1e7494335d Mon Sep 17 00:00:00 2001 From: fdai7782 Date: Sun, 4 Feb 2024 18:45:48 +0000 Subject: [PATCH 032/125] Updated build script and Ceedling configuration --- create_folders.sh | 13 +++++++++++-- project.yml | 15 ++++++++++++--- 2 files changed, 23 insertions(+), 5 deletions(-) diff --git a/create_folders.sh b/create_folders.sh index 3d96d3e..5d73167 100644 --- a/create_folders.sh +++ b/create_folders.sh @@ -1,2 +1,11 @@ -mkdir -p src/main/c -mkdir -p src/test/c/support +#!/bin/bash + +# Check if a Ceedling project exists +if [ -f "project.yml" ]; then + echo "Building and testing C project with Ceedling..." + ceedling test:all + exit $? +else + echo "No Ceedling project found in the current directory." + exit 1 +fi diff --git a/project.yml b/project.yml index a360bc3..4801bd7 100644 --- a/project.yml +++ b/project.yml @@ -88,9 +88,18 @@ :placement: :end :flag: "-l${1}" :path_flag: "-L ${1}" - :system: [] # for example, you might list 'm' to grab the math library - :test: [] - :release: [] + :system: + - m # Example: add 'm' to use the math library + :test: + - stdio + - string + - stdlib + - m # Example: add 'm' to use the math library in tests + :release: + - stdio + - string + - stdlib + - m # Example: add 'm' to use the math library in release builds :plugins: :load_paths: From dff8cc5f434509a8ff4ca0af4fec33de8e725510 Mon Sep 17 00:00:00 2001 From: fdai7782 Date: Sun, 4 Feb 2024 18:57:32 +0000 Subject: [PATCH 033/125] Updated build script and Ceedling configuration in develop branch --- create_folders.sh | 13 +++++++++++-- project.yml | 15 ++++++++++++--- 2 files changed, 23 insertions(+), 5 deletions(-) diff --git a/create_folders.sh b/create_folders.sh index 3d96d3e..5d73167 100644 --- a/create_folders.sh +++ b/create_folders.sh @@ -1,2 +1,11 @@ -mkdir -p src/main/c -mkdir -p src/test/c/support +#!/bin/bash + +# Check if a Ceedling project exists +if [ -f "project.yml" ]; then + echo "Building and testing C project with Ceedling..." + ceedling test:all + exit $? +else + echo "No Ceedling project found in the current directory." + exit 1 +fi diff --git a/project.yml b/project.yml index a360bc3..4801bd7 100644 --- a/project.yml +++ b/project.yml @@ -88,9 +88,18 @@ :placement: :end :flag: "-l${1}" :path_flag: "-L ${1}" - :system: [] # for example, you might list 'm' to grab the math library - :test: [] - :release: [] + :system: + - m # Example: add 'm' to use the math library + :test: + - stdio + - string + - stdlib + - m # Example: add 'm' to use the math library in tests + :release: + - stdio + - string + - stdlib + - m # Example: add 'm' to use the math library in release builds :plugins: :load_paths: From b3773ad434c616376f18ba9d8d55e49c460483c0 Mon Sep 17 00:00:00 2001 From: fdai7782 Date: Sun, 4 Feb 2024 19:43:33 +0000 Subject: [PATCH 034/125] Fixed syntax errors in team member's code --- src/main/c/BasicMode.c | 12 ++++++------ src/main/c/main_taschenrechner.c | 8 ++++---- src/main/c/taschenrechner.h | 12 ++++++------ src/main/c/testForOperator.c | 5 +++-- 4 files changed, 19 insertions(+), 18 deletions(-) diff --git a/src/main/c/BasicMode.c b/src/main/c/BasicMode.c index cfb5ded..f6101c3 100644 --- a/src/main/c/BasicMode.c +++ b/src/main/c/BasicMode.c @@ -14,17 +14,17 @@ void BasicMode() { do { //100 doubles in this array goes through the for loop till 100 numbers or = is entered - for (int i = 0; i < 100) { + for (int i = 0; i < 100; i++) { printf("Enter a Number: "); numbers[i] = testForNumber(); //gets number printf("Enter a operation: "); operators[i] = testForOperator(); //gets operator } - } while (endtmp != '1') + } while (endtmp != '1'); - for (int i = 0; i < 100) {//checks all operators to check for priority + for (int i = 0; i < 100; i++) {//checks all operators to check for priority if ((operators[i] == '/' || operators[i] == '*') && i > 1) { //if operators[i] == / or * and i>1 so you dont get numbers[-1] if (operators[i] == '/') { result += divide(numbers[i - 1], numbers[i]); //divides if char is / and adds number to the result @@ -45,12 +45,12 @@ void BasicMode() { } } - else if (i<=1 && operator[i] == '=') { //if there are less then 2 numbers in the array + else if (i<=1 && operators[i] == '=') { //if there are less then 2 numbers in the array result = numbers[i]; //set result to the 0 digit } - else if (operator[i] == '=') { //if char is = - printf("The result is: %d", result); //print out the result + else if (operators[i] == '=') { //if char is = + printf("The result is: %f", result); //print out the result i = 100; break; } diff --git a/src/main/c/main_taschenrechner.c b/src/main/c/main_taschenrechner.c index f1fccac..02c981a 100644 --- a/src/main/c/main_taschenrechner.c +++ b/src/main/c/main_taschenrechner.c @@ -6,19 +6,19 @@ #include "taschenrechner.h" -doulbe add(doulbe a, doulbe b) { +double add(double a, double b) { return a + b; } -doulbe minus (doulbe a, doulbe b){ +double minus (double a, double b){ return a - b; } -doulbe multiply(doulbe a, doulbe b) { +double multiply(double a, double b) { return a * b; } -doulbe divide(doulbe a, doulbe b) { +double divide(double a, double b) { if (b == 0) { return 0; } diff --git a/src/main/c/taschenrechner.h b/src/main/c/taschenrechner.h index 3855a6c..ffd85ad 100644 --- a/src/main/c/taschenrechner.h +++ b/src/main/c/taschenrechner.h @@ -2,22 +2,22 @@ #define TASCHENRECHNER_H //add function -doulbe add(doulbe a, doulbe b); +double add(double a, double b); //minus function -doulbe minus(doulbe a, doulbe b); +double minus(double a, double b); //multiply function -doulbe multiply(doulbe a, doulbe b); +double multiply(double a, double b); //divide function -doulbe divide(doulbe a, doulbe b); +double divide(double a, double b); //get input and check if its a number -double testForNumber() +double testForNumber(); //get input and check if its a operator -char testForOperator() +char testForOperator(); // Square root function double squareRootFunction(double x); diff --git a/src/main/c/testForOperator.c b/src/main/c/testForOperator.c index 51b1931..0ad34c6 100644 --- a/src/main/c/testForOperator.c +++ b/src/main/c/testForOperator.c @@ -2,6 +2,7 @@ #include #include #include +#include #include "taschenrechner.h" @@ -9,7 +10,7 @@ char testForOperator() { //saving the number of operators in a variable so it only needs to be changed in one location int numberOfOperators = 5; //array where all valid Operators are saved, can be esily expanded - char oppArray[numberOfOperators] = { '+','-','*','/','=' }; + char oppArray[] = { '+','-','*','/','=' }; char input; bool validInput = false; @@ -23,6 +24,6 @@ char testForOperator() { } } //if the input was deemed invalid it asks for new input and goes to the top of the while loop - printf("Diese Eigabe war nicht zulässig probieren sie es noch einmal!\n"); + printf("The input was not allowed. Please try again!\n"); } } \ No newline at end of file From e1ed311b32e5d7b66cd57e99f3c44c2584ad3d4a Mon Sep 17 00:00:00 2001 From: Enrico Schellenberger Date: Mon, 5 Feb 2024 12:10:27 +0100 Subject: [PATCH 035/125] added ConvertMode.c with all conversion options --- src/main/c/ConvertMode.c | 51 ++++++++++++++++++++++++++++++++ src/main/c/main_taschenrechner.c | 16 ---------- 2 files changed, 51 insertions(+), 16 deletions(-) create mode 100644 src/main/c/ConvertMode.c diff --git a/src/main/c/ConvertMode.c b/src/main/c/ConvertMode.c new file mode 100644 index 0000000..ef9e7be --- /dev/null +++ b/src/main/c/ConvertMode.c @@ -0,0 +1,51 @@ +#include +#include +#include +#include +#include + +#include "taschenrechner.h" +// Unit converter mode + +void unitConverterMode() { + int choice; + double value, result; + + printf("Unit Converter Mode:\n"); + + printf("Distance conversions:\n"); + printf("1. Convert Meter (cm, m, km)\n"); + printf("2. Meter to foot/inches\n"); + printf("3. Kilometer to Miles\n"); + + printf("Weight conversion:\n"); + printf("4. Convert Gram (mg, g, kg)\n"); + + printf("Temprature conversion:\n"); + printf("5. Celsius to Fahrenheit\n"); + + printf("Speed conversion:\n"); + printf("6. km/h to mph \n"); + + printf("Fluid conversion:\n"); + printf("7. Convert Liter (ml, l, kl) \n"); + printf("8. Liter to Gallon\n"); + + printf("Data conversions:\n"); + printf("9. Convert Data size (MB, GB, TB)\n"); + + printf("Area/Volume conversions \n"); + printf("10. Convert area (cm², m², km²) \n"); + printf("11. Convert Volume (cm³, m³, km³)\n"); + + printf("Time conversion \n"); + printf("13. Convert time (s, m, h) \n"); + printf("14. Convert Clock (12 Hour, 24 Hour) \n"); + + printf("\nEnter your choice (Exit with 0): "); + scanf("%d", &choice); + + printf("Enter the value to convert: "); + scanf("%lf", &value); + +} \ No newline at end of file diff --git a/src/main/c/main_taschenrechner.c b/src/main/c/main_taschenrechner.c index 02c981a..edbc325 100644 --- a/src/main/c/main_taschenrechner.c +++ b/src/main/c/main_taschenrechner.c @@ -166,23 +166,7 @@ void programmingMode() { } -// Unit converter mode -void unitConverterMode() { - int choice; - double value, result; - - printf("Unit Converter Mode:\n"); - printf("1. Meter to Kilometer\n"); - printf("2. Kilogram to Gram\n"); - printf("3. Celsius to Fahrenheit\n"); - printf("Enter your choice: "); - scanf("%d", &choice); - - printf("Enter the value to convert: "); - scanf("%lf", &value); - -} // change mode int mode(int userChoice){ From 43b098aec46c7228023c4a45a3e4b2ada1e927c1 Mon Sep 17 00:00:00 2001 From: Enrico Schellenberger Date: Mon, 5 Feb 2024 12:28:43 +0100 Subject: [PATCH 036/125] added Con Functions and query to ConvertMode.c --- src/main/c/ConvertMode.c | 74 ++++++++++++++++++++++++++++++++++++++-- 1 file changed, 72 insertions(+), 2 deletions(-) diff --git a/src/main/c/ConvertMode.c b/src/main/c/ConvertMode.c index ef9e7be..e9ec6ef 100644 --- a/src/main/c/ConvertMode.c +++ b/src/main/c/ConvertMode.c @@ -7,6 +7,77 @@ #include "taschenrechner.h" // Unit converter mode +double getValue() { + printf("Enter the first value to convert: "); + scanf("%lf", &value); + + printf("Enter the second value to convert: "); + scanf("%lf", &value); + + while (choice < 0 && choice >= 14) { + switch (choice) + { + case 1: + + break; + + } + } +} + +double ConMeter() { + +} + +double ConMeterToFoot() { + +} + +double ConKilometerToMiles() { + +} + +double ConGram() { + +} + +double ConTemp() { + +} + +double ConSpeed() { + +} + +double ConLiter() { + +} + +double ConLiterToGallon() { + +} + +double ConData() { + +} + +double ConArea() { + +} + +double ConVolume() { + +} + +double ConTime() { + +} + +double ConClock() { + +} + + void unitConverterMode() { int choice; double value, result; @@ -45,7 +116,6 @@ void unitConverterMode() { printf("\nEnter your choice (Exit with 0): "); scanf("%d", &choice); - printf("Enter the value to convert: "); - scanf("%lf", &value); + } \ No newline at end of file From 2424f9219111660ac1ba70168c308f0ac23a2a7e Mon Sep 17 00:00:00 2001 From: Enrico Schellenberger Date: Mon, 5 Feb 2024 14:01:13 +0100 Subject: [PATCH 037/125] added Unit arrays and switch case for Meter conversionto ConvertMode.c --- src/main/c/ConvertMode.c | 52 +++++++++++++++++++++++++--------------- 1 file changed, 33 insertions(+), 19 deletions(-) diff --git a/src/main/c/ConvertMode.c b/src/main/c/ConvertMode.c index e9ec6ef..454577f 100644 --- a/src/main/c/ConvertMode.c +++ b/src/main/c/ConvertMode.c @@ -7,25 +7,39 @@ #include "taschenrechner.h" // Unit converter mode -double getValue() { - printf("Enter the first value to convert: "); +int choice, startingUnit, endingUnit; +double value, result; +char Distance[] = { 'mm', 'cm', 'm', 'km' }; +char Weight[] = { 'mg', 'g', 'kg', 't' }; +char Fluid[] = { 'ml', 'l' }; +char Data[] = { 'B', 'KB', 'MB', 'GB', 'TB', 'PT' }; +char Time[] = { 'ms', 's', 'min', 'h', 'd', 'w', 'mon', 'y' }; +char currency[] = { 'E', 'D', 'R' }; + +double getValue(int choice) { + printf("\nEnter the value to be converted: "); scanf("%lf", &value); - printf("Enter the second value to convert: "); - scanf("%lf", &value); - - while (choice < 0 && choice >= 14) { + while (choice < 0 && choice >= 15) { switch (choice) { case 1: + printf("\nEnter what the Unit is starting with: "); + scanf("%d", &startingUnit); + + printf("\nEnter what the value should it be changed to: "); + scanf("%d", &endingUnit); + result = ConMeter(value, startingUnit,endingUnit); + + printf("\nThe convertet result is %dlf %d", result, Distance[unit]); break; } } } -double ConMeter() { +double ConMeter(double meter, int startingUnit, int endingUnit) { } @@ -79,8 +93,6 @@ double ConClock() { void unitConverterMode() { - int choice; - double value, result; printf("Unit Converter Mode:\n"); @@ -91,31 +103,33 @@ void unitConverterMode() { printf("Weight conversion:\n"); printf("4. Convert Gram (mg, g, kg)\n"); + printf("5. Gram to Pounds \n") printf("Temprature conversion:\n"); - printf("5. Celsius to Fahrenheit\n"); + printf("6. Celsius to Fahrenheit\n"); printf("Speed conversion:\n"); - printf("6. km/h to mph \n"); + printf("7. km/h to mph \n"); printf("Fluid conversion:\n"); - printf("7. Convert Liter (ml, l, kl) \n"); - printf("8. Liter to Gallon\n"); + printf("8. Convert Liter (ml, l, kl) \n"); + printf("9. Liter to Gallon\n"); printf("Data conversions:\n"); - printf("9. Convert Data size (MB, GB, TB)\n"); + printf("10. Convert Data size (MB, GB, TB)\n"); printf("Area/Volume conversions \n"); - printf("10. Convert area (cm², m², km²) \n"); - printf("11. Convert Volume (cm³, m³, km³)\n"); + printf("11. Convert area (cm², m², km²) \n"); + printf("12. Convert Volume (cm³, m³, km³)\n"); printf("Time conversion \n"); printf("13. Convert time (s, m, h) \n"); printf("14. Convert Clock (12 Hour, 24 Hour) \n"); + printf("Time conversion \n"); + printf("15. Convert currency (Euro, Dollar, Russian Rubel) \n"); + printf("\nEnter your choice (Exit with 0): "); scanf("%d", &choice); - - - + getValue(choice); } \ No newline at end of file From 90482fe0a12aab29e2ca1c4af56572b3225fccfb Mon Sep 17 00:00:00 2001 From: fdai7782 Date: Mon, 5 Feb 2024 16:37:20 +0000 Subject: [PATCH 038/125] Renamed the sh file to build-project --- create_folders.sh => build-project.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename create_folders.sh => build-project.sh (100%) diff --git a/create_folders.sh b/build-project.sh similarity index 100% rename from create_folders.sh rename to build-project.sh From cd307047e57620bbb77f359cd4b848159dd2451d Mon Sep 17 00:00:00 2001 From: fdai7782 Date: Mon, 5 Feb 2024 16:38:14 +0000 Subject: [PATCH 039/125] Renamed the sh file to build-project --- create_folders.sh => build-project.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename create_folders.sh => build-project.sh (100%) diff --git a/create_folders.sh b/build-project.sh similarity index 100% rename from create_folders.sh rename to build-project.sh From 002a3cca8078c044d265918db2199b335c01daa6 Mon Sep 17 00:00:00 2001 From: Enrico Schellenberger Date: Mon, 5 Feb 2024 17:51:48 +0100 Subject: [PATCH 040/125] added ConMeter logic to ConvertMode.c --- src/main/c/ConvertMode.c | 110 ++++++++++++++++++++++++++++++++++++--- 1 file changed, 104 insertions(+), 6 deletions(-) diff --git a/src/main/c/ConvertMode.c b/src/main/c/ConvertMode.c index 454577f..2d9e9ae 100644 --- a/src/main/c/ConvertMode.c +++ b/src/main/c/ConvertMode.c @@ -9,6 +9,7 @@ int choice, startingUnit, endingUnit; double value, result; + char Distance[] = { 'mm', 'cm', 'm', 'km' }; char Weight[] = { 'mg', 'g', 'kg', 't' }; char Fluid[] = { 'ml', 'l' }; @@ -16,6 +17,7 @@ char Data[] = { 'B', 'KB', 'MB', 'GB', 'TB', 'PT' }; char Time[] = { 'ms', 's', 'min', 'h', 'd', 'w', 'mon', 'y' }; char currency[] = { 'E', 'D', 'R' }; + double getValue(int choice) { printf("\nEnter the value to be converted: "); scanf("%lf", &value); @@ -24,15 +26,15 @@ double getValue(int choice) { switch (choice) { case 1: - printf("\nEnter what the Unit is starting with: "); + printf("\nEnter what the Unit is starting with (0 mm, 1 cm, 2 m, 3 km): "); scanf("%d", &startingUnit); - - printf("\nEnter what the value should it be changed to: "); + //1 10 1.000 1.000.000 + printf("\nEnter what the value should it be changed to (0 mm, 1 cm, 2 m, 3 km): "); scanf("%d", &endingUnit); result = ConMeter(value, startingUnit,endingUnit); - printf("\nThe convertet result is %dlf %d", result, Distance[unit]); + printf("\nThe convertet result is %dlf %d", result, Distance[endingUnit]); break; } @@ -40,11 +42,107 @@ double getValue(int choice) { } double ConMeter(double meter, int startingUnit, int endingUnit) { - + switch (startingUnit) + { + case 0: //mm to x + switch (endingUnit) + { + case 0: //1mm + return meter; + break; + + case 1: //0.1cm + return meter/10; + break; + + case 2: //0.001m + return meter/1000; + break; + + case 3: //0.000001km + return meter/1000000; + break; + + default: + break; + } + + case 1: //cm to x + switch (endingUnit) + { + case 0: //10 + return meter*10; + break; + + case 1: //1 + return meter; + break; + + case 2: //0.01 + return meter/100; + break; + + case 3: //0.00001 + return meter/100000; + break; + + default: + break; + } + + case 2: //m to x + switch (endingUnit) + { + case 0: //1000 + return meter*1000; + break; + + case 1: //100 + return meter*100; + break; + + case 2: //1 + return meter; + break; + + case 3: //0.001 + return meter/1000; + break; + + default: + break; + } + + case 3:// km to x + switch (endingUnit) + { + case 0: // 1000000 + return meter*1000000; + break; + + case 1: // 100000 + return meter*100000; + break; + + case 2: // 1000 m + return meter*1000; + break; + + case 3: //1 km + return meter; + break; + + default: + break; + } + + default: + break; + } } double ConMeterToFoot() { - + } double ConKilometerToMiles() { From 4455b53c8908e9ff8246ea37820e2898470b5299 Mon Sep 17 00:00:00 2001 From: fdai7782 Date: Mon, 5 Feb 2024 17:13:54 +0000 Subject: [PATCH 041/125] Added scientific.c file --- src/main/c/scientific.c | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 src/main/c/scientific.c diff --git a/src/main/c/scientific.c b/src/main/c/scientific.c new file mode 100644 index 0000000..0500106 --- /dev/null +++ b/src/main/c/scientific.c @@ -0,0 +1,10 @@ +// scientific.c +#include +#include +#include "taschenrechner.h" + + +double scientificMode() { + + return 0.0; +} From db94a28b78b89d949be1793671708637e4cbfb4c Mon Sep 17 00:00:00 2001 From: fdai7782 Date: Mon, 5 Feb 2024 18:05:19 +0000 Subject: [PATCH 042/125] Removed scientificMode function from main_calculator.c and fixed syntax error. --- src/main/c/main_taschenrechner.c | 57 +------------------------------- 1 file changed, 1 insertion(+), 56 deletions(-) diff --git a/src/main/c/main_taschenrechner.c b/src/main/c/main_taschenrechner.c index ca1a051..cf35f78 100644 --- a/src/main/c/main_taschenrechner.c +++ b/src/main/c/main_taschenrechner.c @@ -5,22 +5,6 @@ #include "taschenrechner.h" - -<<<<<<< HEAD -doulbe add(doulbe a, doulbe b) { - return a + b; -} - -doulbe minus (doulbe a, doulbe b){ - return a - b; -} - -doulbe multiply(doulbe a, doulbe b) { - return a * b; -} - -doulbe divide(doulbe a, doulbe b) { -======= double add(double a, double b) { return a + b; } @@ -34,7 +18,7 @@ double multiply(double a, double b) { } double divide(double a, double b) { ->>>>>>> feature + if (b == 0) { return 0; } @@ -106,45 +90,6 @@ int bitwiseXOR(int num1, int num2) { //.. -// scientificmode -int scientificMode(){ - - double num, result; - - int choice; - - printf("Enter a number: "); - - scanf("%lf", &num); // scan the number from user - - printf("Scientific mode Options:\n"); - printf("1: Square root:\n"); - printf("2: Exponential:\n"); - printf("2: Logarithm:\n"); - printf("4: Trigonomertic"); - scanf("%d", &choice); // user choice - - switch(choice) { - - case 1: // Square root - break; - - case 2: // Exponential - break; - - case 3: // Logarithm - break; - - case 4: // Trigonomertic - break; - - default: printf("Invalid choice. Please try again.\n"); - - } - - return result; -} - // graphMode void graphMode() { double x, y; From 53f0189b35231758fc273000ea34e5c53afd3df8 Mon Sep 17 00:00:00 2001 From: fdai7782 Date: Mon, 5 Feb 2024 18:06:06 +0000 Subject: [PATCH 043/125] Fixed error in calculator.h --- src/main/c/taschenrechner.h | 54 +------------------------------------ 1 file changed, 1 insertion(+), 53 deletions(-) diff --git a/src/main/c/taschenrechner.h b/src/main/c/taschenrechner.h index b08a381..6382ac0 100644 --- a/src/main/c/taschenrechner.h +++ b/src/main/c/taschenrechner.h @@ -1,54 +1,3 @@ -<<<<<<< HEAD -#ifndef TASCHENRECHNER_H -#define TASCHENRECHNER_H - -doulbe add(doulbe a, doulbe b); - -doulbe minus(doulbe a, doulbe b); - -doulbe multiply(doulbe a, doulbe b); - -doulbe divide(doulbe a, doulbe b); - -// Square root function -double squareRootFunction(double x); - -//.. -// Trigonometric functions -double sineFunction(double angle); - -double cosineFunction(double angle); - -double tangentFunction(double angle); - -//.. -// Logarithmic functions -double logarithmFunction(double x); - -double naturalLogarithmFunction(double x); - -double logarithmBase2Function(double x); - -//.. -// Exponential function -double exponentialFunction(double x); - -// .. -// Bitwise AND function -int bitwiseAND(int num1, int num2); - -// Bitwise OR function -int bitwiseOR(int num1, int num2); - -// Bitwise XOR function -int bitwiseXOR(int num1, int num2); - -int mode(int userChoice); - -int displayMenu(); - -#endif // TASCHENRECHNER_H -======= #ifndef TASCHENRECHNER_H #define TASCHENRECHNER_H @@ -107,5 +56,4 @@ int mode(int userChoice); int displayMenu(); -#endif // TASCHENRECHNER_H ->>>>>>> feature +#endif // TASCHENRECHNER_H From c0d776bc4ea3c09ea4841045c72dc54c6d8b15c4 Mon Sep 17 00:00:00 2001 From: fdai7782 Date: Mon, 5 Feb 2024 18:09:57 +0000 Subject: [PATCH 044/125] Added functionality (not complete) in scientific.c and changed the file name to scientificMode.c --- src/main/c/scientificMode.c | 44 +++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 src/main/c/scientificMode.c diff --git a/src/main/c/scientificMode.c b/src/main/c/scientificMode.c new file mode 100644 index 0000000..52ba133 --- /dev/null +++ b/src/main/c/scientificMode.c @@ -0,0 +1,44 @@ +// scientificMode + +#include +#include +#include "taschenrechner.h" + + +int scientificMode(){ + + double num, result; + + int choice; + + printf("Enter a number: "); + + scanf("%lf", &num); // scan the number from user + + printf("Scientific mode Options:\n"); + printf("1: Square root:\n"); + printf("2: Exponential:\n"); + printf("2: Logarithm:\n"); + printf("4: Trigonomertic"); + scanf("%d", &choice); // user choice + + switch(choice) { + + case 1: // Square root + break; + + case 2: // Exponential + break; + + case 3: // Logarithm + break; + + case 4: // Trigonomertic + break; + + default: printf("Invalid choice. Please try again.\n"); + + } + + return result; +} From ae474287b28d80d63f16ab5b7190d2ca113594ea Mon Sep 17 00:00:00 2001 From: fdai7782 Date: Mon, 5 Feb 2024 18:27:38 +0000 Subject: [PATCH 045/125] Deleted scientific.c file --- src/main/c/scientific.c | 10 ---------- 1 file changed, 10 deletions(-) delete mode 100644 src/main/c/scientific.c diff --git a/src/main/c/scientific.c b/src/main/c/scientific.c deleted file mode 100644 index 0500106..0000000 --- a/src/main/c/scientific.c +++ /dev/null @@ -1,10 +0,0 @@ -// scientific.c -#include -#include -#include "taschenrechner.h" - - -double scientificMode() { - - return 0.0; -} From eb61b94c137d38adc0812feacc7c788f7c30b937 Mon Sep 17 00:00:00 2001 From: fdai7782 Date: Mon, 5 Feb 2024 18:40:02 +0000 Subject: [PATCH 046/125] Implement basic scientific calculator functions. --- src/main/c/scientificMode.c | 33 +++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/src/main/c/scientificMode.c b/src/main/c/scientificMode.c index 52ba133..b855139 100644 --- a/src/main/c/scientificMode.c +++ b/src/main/c/scientificMode.c @@ -4,7 +4,6 @@ #include #include "taschenrechner.h" - int scientificMode(){ double num, result; @@ -12,33 +11,39 @@ int scientificMode(){ int choice; printf("Enter a number: "); - scanf("%lf", &num); // scan the number from user - + printf("Scientific mode Options:\n"); - printf("1: Square root:\n"); - printf("2: Exponential:\n"); - printf("2: Logarithm:\n"); - printf("4: Trigonomertic"); + printf("1: Square root\n"); + printf("2: Exponential\n"); + printf("3: Logarithm\n"); + printf("4: Trigonometric\n"); scanf("%d", &choice); // user choice switch(choice) { case 1: // Square root - break; + result = squareRootFunction(num); + break; case 2: // Exponential - break; + result = exponentialFunction(num); + break; case 3: // Logarithm - break; + result = logarithmFunction(num); + break; + + case 4: // Trigonometric + result = sineFunction(num); + break; - case 4: // Trigonomertic - break; - - default: printf("Invalid choice. Please try again.\n"); + default: + printf("Invalid choice. Please try again.\n"); + return -1; // Return an error code to indicate failure } + printf("Result: %lf\n", result); return result; } From d67b4dae4c05002f9b9b5f1e69c9e2bbf926047f Mon Sep 17 00:00:00 2001 From: fdai7782 Date: Mon, 5 Feb 2024 18:42:40 +0000 Subject: [PATCH 047/125] Implement trigonometric functions in scientific calculator. --- src/main/c/scientificMode.c | 84 +++++++++++++++++++++++-------------- 1 file changed, 53 insertions(+), 31 deletions(-) diff --git a/src/main/c/scientificMode.c b/src/main/c/scientificMode.c index b855139..32a80c6 100644 --- a/src/main/c/scientificMode.c +++ b/src/main/c/scientificMode.c @@ -1,49 +1,71 @@ // scientificMode -#include -#include #include "taschenrechner.h" +#include +#include -int scientificMode(){ +int scientificMode() { - double num, result; + double num, result; - int choice; + int choice; - printf("Enter a number: "); - scanf("%lf", &num); // scan the number from user + printf("Enter a number: "); + scanf("%lf", &num); // scan the number from user - printf("Scientific mode Options:\n"); - printf("1: Square root\n"); - printf("2: Exponential\n"); - printf("3: Logarithm\n"); - printf("4: Trigonometric\n"); - scanf("%d", &choice); // user choice + printf("Scientific mode Options:\n"); + printf("1: Square root\n"); + printf("2: Exponential\n"); + printf("3: Logarithm\n"); + printf("4: Trigonometric\n"); + scanf("%d", &choice); // user choice - switch(choice) { + switch (choice) { - case 1: // Square root - result = squareRootFunction(num); - break; + case 1: // Square root + result = squareRootFunction(num); + break; - case 2: // Exponential - result = exponentialFunction(num); - break; + case 2: // Exponential + result = exponentialFunction(num); + break; - case 3: // Logarithm - result = logarithmFunction(num); - break; + case 3: // Logarithm + result = logarithmFunction(num); + break; - case 4: // Trigonometric - result = sineFunction(num); - break; + case 4: // Trigonometric + printf("Trigonometric functions:\n"); + printf("5: Sine\n"); + printf("6: Cosine\n"); + printf("7: Tangent\n"); + int trigChoice; + scanf("%d", &trigChoice); - default: - printf("Invalid choice. Please try again.\n"); - return -1; // Return an error code to indicate failure + switch (trigChoice) { + case 5: // Sine + result = sin(num); + break; + case 6: // Cosine + result = cos(num); + break; + + case 7: // Tangent + result = tan(num); + break; + + default: + printf("Invalid trigonometric function choice.\n"); + return -1; // Return an error code to indicate failure } + break; + + default: + printf("Invalid choice. Please try again.\n"); + return -1; // Return an error code to indicate failure + } - printf("Result: %lf\n", result); - return result; + printf("Result: %lf\n", result); + return result; } From fea3474ea498b491fa654466527591ed5de3c839 Mon Sep 17 00:00:00 2001 From: fdai7782 Date: Mon, 5 Feb 2024 18:56:17 +0000 Subject: [PATCH 048/125] Integrate additional mathematical functions into the scientific calculator and also a do loop to change between modes. --- src/main/c/scientificMode.c | 179 +++++++++++++++++++++++------------- 1 file changed, 113 insertions(+), 66 deletions(-) diff --git a/src/main/c/scientificMode.c b/src/main/c/scientificMode.c index 32a80c6..88b69f7 100644 --- a/src/main/c/scientificMode.c +++ b/src/main/c/scientificMode.c @@ -1,71 +1,118 @@ // scientificMode -#include "taschenrechner.h" -#include #include +#include +#include "taschenrechner.h" -int scientificMode() { - - double num, result; - - int choice; - - printf("Enter a number: "); - scanf("%lf", &num); // scan the number from user - - printf("Scientific mode Options:\n"); - printf("1: Square root\n"); - printf("2: Exponential\n"); - printf("3: Logarithm\n"); - printf("4: Trigonometric\n"); - scanf("%d", &choice); // user choice - - switch (choice) { - - case 1: // Square root - result = squareRootFunction(num); - break; - - case 2: // Exponential - result = exponentialFunction(num); - break; - - case 3: // Logarithm - result = logarithmFunction(num); - break; - - case 4: // Trigonometric - printf("Trigonometric functions:\n"); - printf("5: Sine\n"); - printf("6: Cosine\n"); - printf("7: Tangent\n"); - int trigChoice; - scanf("%d", &trigChoice); - - switch (trigChoice) { - case 5: // Sine - result = sin(num); - break; - - case 6: // Cosine - result = cos(num); - break; - - case 7: // Tangent - result = tan(num); - break; - - default: - printf("Invalid trigonometric function choice.\n"); - return -1; // Return an error code to indicate failure - } - break; - - default: - printf("Invalid choice. Please try again.\n"); - return -1; // Return an error code to indicate failure - } - - printf("Result: %lf\n", result); - return result; +int scientificMode(){ + + double num, result; + + int choice; + + do { + printf("Enter a number: "); + scanf("%lf", &num); // scan the number from the user + + printf("Scientific mode Options:\n"); + printf("1: Square root\n"); + printf("2: Exponential\n"); + printf("3: Logarithm\n"); + printf("4: Trigonometric\n"); + printf("0: Exit\n"); + scanf("%d", &choice); // user choice + + int logChoice, trigChoice; // Move the initialization outside the loops + + switch(choice) { + + case 1: // Square root + result = squareRootFunction(num); + printf("Result: %lf\n", result); + break; + + case 2: // Exponential + result = exponentialFunction(num); + printf("Result: %lf\n", result); + break; + + case 3: // Logarithm + do { + printf("Logarithm Options:\n"); + printf("1: Logarithm (base 10)\n"); + printf("2: Natural Logarithm (ln)\n"); + printf("3: Logarithm (base 2)\n"); + printf("0: Exit Logarithm Menu\n"); + scanf("%d", &logChoice); + + switch(logChoice) { + case 1: // Logarithm (base 10) + result = logarithmFunction(num); + printf("Result: %lf\n", result); + break; + + case 2: // Natural Logarithm (ln) + result = naturalLogarithmFunction(num); + printf("Result: %lf\n", result); + break; + + case 3: // Logarithm (base 2) + result = logarithmBase2Function(num); + printf("Result: %lf\n", result); + break; + + case 0: // Exit the logarithm menu + break; + + default: + printf("Invalid logarithm function choice. Please try again.\n"); + } + } while (logChoice != 0); + break; + + case 4: // Trigonometric + do { + printf("Trigonometric functions:\n"); + printf("1: Sine\n"); + printf("2: Cosine\n"); + printf("3: Tangent\n"); + printf("0: Exit Trigonometric Menu\n"); + scanf("%d", &trigChoice); + + switch(trigChoice) { + case 1: // Sine + result = sineFunction(num); + printf("Result: %lf\n", result); + break; + + case 2: // Cosine + result = cosineFunction(num); + printf("Result: %lf\n", result); + break; + + case 3: // Tangent + result = tangentFunction(num); + printf("Result: %lf\n", result); + break; + + case 0: // Exit the trigonometric menu + break; + + default: + printf("Invalid trigonometric function choice. Please try again.\n"); + } + } while (trigChoice != 0); + break; + + case 0: // Exit the loop + break; + + default: + printf("Invalid choice. Please try again.\n"); + + } + + } while (choice != 0); + + return result; } From a8968a0d652afd8a64031858f412a5b79dcc887e Mon Sep 17 00:00:00 2001 From: Enrico Schellenberger Date: Mon, 5 Feb 2024 20:47:16 +0100 Subject: [PATCH 049/125] added test to develop branch --- src/test/c/test_taschenrechner.c | 114 +++++++++++++++++++------------ 1 file changed, 72 insertions(+), 42 deletions(-) diff --git a/src/test/c/test_taschenrechner.c b/src/test/c/test_taschenrechner.c index 6ad4cc7..5e16459 100644 --- a/src/test/c/test_taschenrechner.c +++ b/src/test/c/test_taschenrechner.c @@ -1,42 +1,72 @@ -#ifdef TEST - -#include "unity.h" - -#include "taschenrechner.h" - -void setUp(void) -{ -} - -void tearDown(void) -{ -} - -void test_addition(void) -{ - doulbe result = add(1, 2); - TEST_ASSERT_EQUAL(3, result); -} - -void test_minus(void) -{ - doulbe result = minus(3, 1); - TEST_ASSERT_EQUAL(2, result); -} - -void test_multiply(void) -{ - doulbe result = multiply(1, 2); - TEST_ASSERT_EQUAL(2, result); -} - -void test_divide(void) -{ - doulbe result = divide(4, 2); - TEST_ASSERT_EQUAL(2, result); - - doulbe result1 = divide(4, 0); - TEST_ASSERT_EQUAL(0, result1); -} - -#endif // TEST +#ifdef TEST + +#include "unity.h" + +#include "taschenrechner.h" + +void setUp(void) +{ +} + +void tearDown(void) +{ +} + +void test_addition(void) +{ + doulbe result = add(1, 2); + TEST_ASSERT_EQUAL(3, result); +} + +void test_minus(void) +{ + doulbe result = minus(3, 1); + TEST_ASSERT_EQUAL(2, result); +} + +void test_multiply(void) +{ + doulbe result = multiply(1, 2); + TEST_ASSERT_EQUAL(2, result); +} + +void test_divide(void) +{ + doulbe result = divide(4, 2); + TEST_ASSERT_EQUAL(2, result); + + doulbe result1 = divide(4, 0); + TEST_ASSERT_EQUAL(0, result1); +} + +void test_ConMeter(void) {//5 mm to cm + double result = ConMeter(5, 0, 1); + TEST_ASSERT_EQUAL(50, result); +} + +void test_ConMeterToFoot(void) {//5 m to foot + double result = ConMeterToFoot(5, 0, 1); + TEST_ASSERT_EQUAL(16.4042, result); +} +void test_ConKilometerToMiles(void) {//5 miles to km + double result = ConKilometerToMiles(5, 0, 1); + TEST_ASSERT_EQUAL(3.10686, result); +} + +void test_ConGram(void) {//5 mg to g + double result = ConGram(5, 0, 1); + TEST_ASSERT_EQUAL(5000, result); +} + +void test_ConGramToPounds(void) {//5 kg to pounds + double result = ConGramToPounds(5, 0, 1); + TEST_ASSERT_EQUAL(11.0231, result); +} + +void test_ConTemp(void) {//5 celsius to fahrenheit + double result = ConTemp(5, 0, 1); + TEST_ASSERT_EQUAL(41, result); +} + + +#endif // TEST From 9fb595ce1d0ddbbc83292f6ea52cfbe6baac2a54 Mon Sep 17 00:00:00 2001 From: Enrico Schellenberger Date: Tue, 6 Feb 2024 16:31:18 +0100 Subject: [PATCH 050/125] added main to develop branch --- src/test/c/test_taschenrechner.c | 41 ++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/src/test/c/test_taschenrechner.c b/src/test/c/test_taschenrechner.c index 5e16459..cf6c739 100644 --- a/src/test/c/test_taschenrechner.c +++ b/src/test/c/test_taschenrechner.c @@ -68,5 +68,46 @@ void test_ConTemp(void) {//5 celsius to fahrenheit TEST_ASSERT_EQUAL(41, result); } +void test_ConSpeed(void) {//5 kmh to mph + double result = ConTemp(5, 0, 1); + TEST_ASSERT_EQUAL(3.10686, result); +} + +void test_ConLiter(void) {//5 l to ml + double result = ConTemp(5, 1, 0); + TEST_ASSERT_EQUAL(5000, result); +} + +void test_ConLiterToGallon(void) {//5 l to gallon + double result = ConTemp(5, 0, 1); + TEST_ASSERT_EQUAL(1.32086, result); +} + +void test_ConData(void) {//5 b to kb + double result = ConData(5, 0, 1); + TEST_ASSERT_EQUAL(0.005, result); +} + +void test_ConArea(void) {//5 mm to cm + double result = ConData(5, 0, 1); + TEST_ASSERT_EQUAL(0.05), result); +} + +void test_ConVolume(void) {//5 mm to cm + double result = ConData(5, 0, 1); + TEST_ASSERT_EQUAL(0.005), result); +} + +void test_ConClock(void) {//5:00 to 5AM + double result = ConData(5, 0, 1); + TEST_ASSERT_EQUAL(5), result); +} + +void test_ConTime(void) {//5 ms to s + double result = ConData(5, 0, 1); + TEST_ASSERT_EQUAL(0.005), result); +} + + #endif // TEST From adb77d67bd634c23e971a324adcc3dd360a146ff Mon Sep 17 00:00:00 2001 From: Enrico Schellenberger Date: Tue, 6 Feb 2024 16:32:41 +0100 Subject: [PATCH 051/125] added test to develop branch --- src/main/c/ConvertMode.c | 292 +++---- src/main/c/main_taschenrechner.c | 1244 +++++++++++++++++++++++++++++- src/main/c/programmingMode.c | 23 + src/main/c/taschenrechner.h | 32 +- 4 files changed, 1436 insertions(+), 155 deletions(-) create mode 100644 src/main/c/programmingMode.c diff --git a/src/main/c/ConvertMode.c b/src/main/c/ConvertMode.c index 2d9e9ae..5ce125c 100644 --- a/src/main/c/ConvertMode.c +++ b/src/main/c/ConvertMode.c @@ -10,11 +10,13 @@ int choice, startingUnit, endingUnit; double value, result; -char Distance[] = { 'mm', 'cm', 'm', 'km' }; -char Weight[] = { 'mg', 'g', 'kg', 't' }; -char Fluid[] = { 'ml', 'l' }; +char Distance[] = { 'mm', 'cm', 'm', 'km', 'feet/inch', 'miles'}; +char Weight[] = { 'mg', 'g', 'kg', 't', 'pounds'}; +char Fluid[] = { 'ml', 'l' , 'gallon'}; +char Temp[] = { 'celsius', 'fahrenheit' }; +char Speed[] = { 'km/h','mp/h' }; char Data[] = { 'B', 'KB', 'MB', 'GB', 'TB', 'PT' }; -char Time[] = { 'ms', 's', 'min', 'h', 'd', 'w', 'mon', 'y' }; +char Time[] = { 'ms', 's', 'min', 'h', 'd', 'w', 'mon', 'y'}; char currency[] = { 'E', 'D', 'R' }; @@ -37,158 +39,182 @@ double getValue(int choice) { printf("\nThe convertet result is %dlf %d", result, Distance[endingUnit]); break; - } - } -} + case 2: + printf("\nEnter what the Unit is starting with (0 feet/Inch, 1 meter): "); + scanf("%d", &startingUnit); -double ConMeter(double meter, int startingUnit, int endingUnit) { - switch (startingUnit) - { - case 0: //mm to x - switch (endingUnit) - { - case 0: //1mm - return meter; - break; - - case 1: //0.1cm - return meter/10; - break; - - case 2: //0.001m - return meter/1000; - break; - - case 3: //0.000001km - return meter/1000000; - break; - - default: - break; - } - - case 1: //cm to x - switch (endingUnit) - { - case 0: //10 - return meter*10; - break; - - case 1: //1 - return meter; - break; - - case 2: //0.01 - return meter/100; - break; - - case 3: //0.00001 - return meter/100000; - break; - - default: - break; - } - - case 2: //m to x - switch (endingUnit) - { - case 0: //1000 - return meter*1000; - break; - - case 1: //100 - return meter*100; - break; - - case 2: //1 - return meter; - break; - - case 3: //0.001 - return meter/1000; - break; - - default: - break; - } - - case 3:// km to x - switch (endingUnit) - { - case 0: // 1000000 - return meter*1000000; - break; - - case 1: // 100000 - return meter*100000; - break; - - case 2: // 1000 m - return meter*1000; - break; - - case 3: //1 km - return meter; - break; - - default: - break; - } - - default: - break; - } -} + printf("\nEnter what the value should it be changed to (0 feet/Inch, 1 meter): "); + scanf("%d", &endingUnit); -double ConMeterToFoot() { - -} + result = ConMeterToFoot(value, startingUnit, endingUnit); + + if (endingUnit == 0) { //if feet/inch change to 4. in array of Distance + endingUnit = 4; + } -double ConKilometerToMiles() { + else if (endingUnit == 1) { //if meter change to 2. in array of Distance + endingUnit = 2; + } -} -double ConGram() { + printf("\nThe convertet result is %dlf %d", result, Distance[endingUnit]); + break; -} + case 3: + printf("\nEnter what the Unit is starting with (0 miles, 1 kilometer): "); + scanf("%d", &startingUnit); -double ConTemp() { + printf("\nEnter what the value should it be changed to (0 miles, 1 kilometer): "); + scanf("%d", &endingUnit); -} + result = ConKilometerToMiles(value, startingUnit, endingUnit); -double ConSpeed() { + if (endingUnit == 0) { //if miles change to 5. in array of Distance + endingUnit = 5; + } -} + else if (endingUnit == 1) { //if kilometer change to 2. in array of Distance + endingUnit = 3; + } -double ConLiter() { + printf("\nThe convertet result is %dlf %d", result, Distance[endingUnit]); + break; -} + case 4://'mg', 'g', 'kg', 't' + printf("\nEnter what the Unit is starting with (0 mg, 1 g, 2 kg , 3 t): "); + scanf("%d", &startingUnit); -double ConLiterToGallon() { + printf("\nEnter what the value should it be changed to (0 mg, 1 g, 2 kg , 3 t): "); + scanf("%d", &endingUnit); -} + result = ConGram(value, startingUnit, endingUnit); -double ConData() { + printf("\nThe convertet result is %dlf %d", result, Weight[endingUnit]); + break; -} + case 5://'kg', 'pounds' + printf("\nEnter what the Unit is starting with (0 kg, 1 pounds): "); + scanf("%d", &startingUnit); -double ConArea() { + printf("\nEnter what the value should it be changed to (0 kg, 1 pounds): "); + scanf("%d", &endingUnit); -} + result = ConGramToPounds(value, startingUnit, endingUnit); -double ConVolume() { + printf("\nThe convertet result is %dlf %d", result, Weight[endingUnit]); + break; -} + case 6://'celsius', 'fahrenheit' + printf("\nEnter what the Unit is starting with (0 celsius, 1 fahrenheit): "); + scanf("%d", &startingUnit); -double ConTime() { + printf("\nEnter what the value should it be changed to (0 celsius, 1 fahrenheit): "); + scanf("%d", &endingUnit); -} + result = ConTemp(value, startingUnit, endingUnit); -double ConClock() { + printf("\nThe convertet result is %dlf %d", result, Temp[endingUnit]); + break; + + case 7://'km/h','mp/h' + printf("\nEnter what the Unit is starting with (0 km/h, 1 mp/h): "); + scanf("%d", &startingUnit); + + printf("\nEnter what the value should it be changed to (0 km/h, 1 mp/h): "); + scanf("%d", &endingUnit); + + result = ConSpeed(value, startingUnit, endingUnit); + + printf("\nThe convertet result is %dlf %d", result, Speed[endingUnit]); + break; + + case 8://'ml', 'l' + printf("\nEnter what the Unit is starting with (0 ml, 1 l): "); + scanf("%d", &startingUnit); + + printf("\nEnter what the value should it be changed to (0 ml, 1 l): "); + scanf("%d", &endingUnit); + + result = ConLiter(value, startingUnit, endingUnit); + + printf("\nThe convertet result is %dlf %d", result, Fluid[endingUnit]); + break; -} + case 9://'ml', 'l' + printf("\nEnter what the Unit is starting with (0 l, 1 gallon): "); + scanf("%d", &startingUnit); + + printf("\nEnter what the value should it be changed to (0 l, 1 gallon): "); + scanf("%d", &endingUnit); + + result = ConLiterToGallon(value, startingUnit, endingUnit); + + printf("\nThe convertet result is %dlf %d", result, Fluid[endingUnit]); + break; + + case 10://char Data[] = { 'B', 'KB', 'MB', 'GB', 'TB', 'PT' }; + printf("\nEnter what the Unit is starting with (0 B, 1 KB, 2 MB , 3 GB, 4 TB, 5 PT): "); + scanf("%d", &startingUnit); + + printf("\nEnter what the value should it be changed to (0 B, 1 KB, 2 MB , 3 GB, 4 TB, 5 PT): "); + scanf("%d", &endingUnit); + + result = ConData(value, startingUnit, endingUnit); + + printf("\nThe convertet result is %dlf %d", result, Data[endingUnit]); + break; + + case 11://char Distance[] = { 'mm', 'cm', 'm', 'km', 'feet/inch', 'miles'}; + printf("\nEnter what the Unit is starting with (0 mm, 1 cm, 2 m , 3 km,): "); + scanf("%d", &startingUnit); + + printf("\nEnter what the value should it be changed to (0 mm, 1 cm, 2 m , 3 km,): "); + scanf("%d", &endingUnit); + + result = ConArea(value, startingUnit, endingUnit); + + printf("\nThe convertet result is %dlf %d²", result, Distance[endingUnit]); + break; + + case 12://char Distance[] = { 'mm', 'cm', 'm', 'km', 'feet/inch', 'miles'}; + printf("\nEnter what the Unit is starting with (0 mm, 1 cm, 2 m , 3 km,): "); + scanf("%d", &startingUnit); + + printf("\nEnter what the value should it be changed to (0 mm, 1 cm, 2 m , 3 km,): "); + scanf("%d", &endingUnit); + + result = ConArea(value, startingUnit, endingUnit); + + printf("\nThe convertet result is %dlf %d³", result, Distance[endingUnit]); + break; + + case 13://char Time[] = { 'ms', 's', 'min', 'h', 'd', 'w', 'mon', 'y' }; + printf("\nEnter what the Unit is starting with (0 ms, 1 s, 2 min, 3 h, 4 d, 5 w, 6 mon, 7 y): "); + scanf("%d", &startingUnit); + + printf("\nEnter what the value should it be changed to (0 ms, 1 s, 2 min, 3 h, 4 d, 5 w, 6 mon, 7 y): "); + scanf("%d", &endingUnit); + + result = ConTime(value, startingUnit, endingUnit); + + printf("\nThe convertet result is %dlf %d", result, Distance[endingUnit]); + break; + + case 14: + printf("\nEnter what the Unit is starting with (0 (24h), 1 (12h)): "); + scanf("%d", &startingUnit); + + printf("\nEnter what the value should it be changed to (0 (24h), 1 (12h)): "); + scanf("%d", &endingUnit); + + result = ConClock(value, startingUnit, endingUnit); + + printf("\nThe convertet result is %dlf %d", result, Distance[endingUnit]); + break; + } + } +} void unitConverterMode() { @@ -201,7 +227,7 @@ void unitConverterMode() { printf("Weight conversion:\n"); printf("4. Convert Gram (mg, g, kg)\n"); - printf("5. Gram to Pounds \n") + printf("5. Gram to Pounds \n"); printf("Temprature conversion:\n"); printf("6. Celsius to Fahrenheit\n"); @@ -221,7 +247,7 @@ void unitConverterMode() { printf("12. Convert Volume (cm³, m³, km³)\n"); printf("Time conversion \n"); - printf("13. Convert time (s, m, h) \n"); + printf("13. Convert time (s, m, h, d, w, m, y) \n"); printf("14. Convert Clock (12 Hour, 24 Hour) \n"); printf("Time conversion \n"); diff --git a/src/main/c/main_taschenrechner.c b/src/main/c/main_taschenrechner.c index cf35f78..414021b 100644 --- a/src/main/c/main_taschenrechner.c +++ b/src/main/c/main_taschenrechner.c @@ -5,6 +5,7 @@ #include "taschenrechner.h" + double add(double a, double b) { return a + b; } @@ -18,7 +19,6 @@ double multiply(double a, double b) { } double divide(double a, double b) { - if (b == 0) { return 0; } @@ -88,8 +88,1229 @@ int bitwiseXOR(int num1, int num2) { return num1 ^ num2; } -//.. +//Conversion Functions +double ConMeter(double meter, int startingUnit, int endingUnit) { + switch (startingUnit) + { + case 0: //mm to x + switch (endingUnit) + { + case 0: //1mm + return meter; + break; + + case 1: //0.1cm + return meter / 10; + break; + + case 2: //0.001m + return meter / 1000; + break; + + case 3: //0.000001km + return meter / 1000000; + break; + + default: + break; + } + + case 1: //cm to x + switch (endingUnit) + { + case 0: //10 + return meter * 10; + break; + + case 1: //1 + return meter; + break; + + case 2: //0.01 + return meter / 100; + break; + + case 3: //0.00001 + return meter / 100000; + break; + + default: + break; + } + + case 2: //m to x + switch (endingUnit) + { + case 0: //1000 + return meter * 1000; + break; + + case 1: //100 + return meter * 100; + break; + + case 2: //1 + return meter; + break; + + case 3: //0.001 + return meter / 1000; + break; + + default: + break; + } + + case 3:// km to x + switch (endingUnit) + { + case 0: // 1000000 + return meter * 1000000; + break; + + case 1: // 100000 + return meter * 100000; + break; + + case 2: // 1000 m + return meter * 1000; + break; + + case 3: //1 km + return meter; + break; + + default: + break; + } + + default: + break; + } +} + +double ConArea(double area, int startingUnit, int endingUnit) { + switch (startingUnit) + { + case 0: //mm to x + switch (endingUnit) + { + case 0: //1mm + return area; + break; + + case 1: //0.01cm + return area / 100; + break; + + case 2: //0.000001m + return area / 1000000; + break; + + case 3: //0.000000000001km + return area / 1000000000000; + break; + + default: + break; + } + + case 1: //cm to x + switch (endingUnit) + { + case 0: //100 + return area * 100; + break; + + case 1: //1 + return area; + break; + + case 2: //0.0001 + return area / 10000; + break; + + case 3: //0.0000000001 + return area / 10000000000; + break; + + default: + break; + } + + case 2: //m to x + switch (endingUnit) + { + case 0: //1000000 + return area * 1000000; + break; + + case 1: //10000 + return area * 10000; + break; + + case 2: //1 + return area; + break; + + case 3: //0.000001 + return area / 1000000; + break; + + default: + break; + } + + case 3:// km to x + switch (endingUnit) + { + case 0: // 1000000000000 + return area * 1000000000000; + break; + + case 1: // 10000000000 + return area * 10000000000; + break; + + case 2: // 1000000 m + return area * 1000000; + break; + + case 3: //1 km + return area; + break; + + default: + break; + } + + default: + break; + } +} + +double ConMeterToFoot(double distance, int startingUnit, int endingUnit) { + switch (startingUnit) + { + case 0: //feet/inch to x + switch (endingUnit) + { + case 0: //feet/inch to feet/inch + return distance; + break; + + case 1: //feet/inch to meter + return distance / 3. 28084; + break; + + default: + break; + } + + case 1: //meter to x + switch (endingUnit) + { + case 0: //meter to feet/inch + return distance * 3. 28084; + break; + + case 1: //feet/inch to feet/inch + return distance; + break; + + default: + break; + } + + default: + break; + } +} + +double ConKilometerToMiles(double distance, int startingUnit, int endingUnit) { + switch (startingUnit) + { + case 0: //miles to x + switch (endingUnit) + { + case 0: //miles to miles + return distance; + break; + + case 1: //miles to kilometer + return distance * 1. 60934; + break; + + default: + break; + } + + case 1: //kilometer to x + switch (endingUnit) + { + case 0: //kilometer to miles + return distance / 1. 60934; + break; + + case 1: //kilometer to kilometer + return distance; + break; + + default: + break; + } + + default: + break; + } +} + +double ConGram(double weight, int startingUnit, int endingUnit) { + switch (startingUnit) + {//'mg', 'g', 'kg', 't' + case 0: //mg to x + switch (endingUnit) + { + case 0: //1 + return weight; + break; + + case 1: //0.001 + return weight / 1000; + break; + + case 2: //0.000001 + return weight / 1000000; + break; + + case 3: //0.000000001 + return weight / 1000000000; + break; + + default: + break; + } + + case 1: //g to x + switch (endingUnit) + { + case 0: //1000 + return weight * 1000; + break; + + case 1: //1 + return weight; + break; + + case 2: //0.01 + return weight / 100; + break; + + case 3: //0.000001 + return weight / 100000; + break; + + default: + break; + } + + case 2: //kg to x + switch (endingUnit) + { + case 0: //1000 + return weight * 1000; + break; + + case 1: //100 + return weight * 100; + break; + + case 2: //1 + return weight; + break; + + case 3: //0.001 + return weight / 1000; + break; + + default: + break; + } + + case 3://t to x + switch (endingUnit) + { + case 0: // 1000000000 + return weight * 1000000; + break; + + case 1: // 1000000 + return weight * 100000; + break; + + case 2: // 1000 + return weight * 1000; + break; + + case 3: //1 + return weight; + break; + + default: + break; + } + + default: + break; + } +} + +double ConGramToPounds(double weight, int startingUnit, int endingUnit) { + switch (startingUnit) + { + case 0: //kg to x + switch (endingUnit) + { + case 0: //kg to pounds + return weight *= 2.20462; + break; + + case 1: //kg to kg + return weight; + break; + + default: + break; + } + + case 1: //pounds to x + switch (endingUnit) + { + case 0: //pounds to kg + return weight *= 0, 453592; + break; + + case 1: //pounds to pounds + return weight; + break; + + default: + break; + } + + default: + break; + } +} + +double ConTemp(double temp, int startingUnit, int endingUnit) { + switch (startingUnit) + { + case 0: //celsius to x + switch (endingUnit) + { + case 0: //celsius to fahrenheit + return temp = (temp - 32) * 0, 55555555; + break; + + case 1: //celsius to celsius + return temp; + break; + + default: + break; + } + + case 1: //fahrenheit to x + switch (endingUnit) + { + case 0: //fahrenheit to celsius + return temp = (temp * 1, 8) + 32; + break; + + case 1: //fahrenheit to fahrenheit + return temp; + break; + + default: + break; + } + + default: + break; + } +} + +double ConSpeed(double speed, int startingUnit, int endingUnit) { + switch (startingUnit) + { + case 0: //kmh to x + switch (endingUnit) + { + case 0: //kmh to kmh + return speed; + break; + + case 1: //kmh to mph + return speed * 0.621371; + break; + + default: + break; + } + + case 1: //mph to x + switch (endingUnit) + { + case 0: //mph to kmh + return speed * 1.60934; + break; + + case 1: //mph to mph + return speed; + break; + + default: + break; + } + + default: + break; + } +} + +double ConLiter(double liter, int startingUnit, int endingUnit) { + switch (startingUnit) + { + case 0: //ml to x + switch (endingUnit) + { + case 0: //ml to ml + return liter; + break; + + case 1: //ml to l + return liter / 1000; + break; + + default: + break; + } + + case 1: //l to x + switch (endingUnit) + { + case 0: //l to ml + return liter * 1000; + break; + + case 1: //l to l + return liter; + break; + + default: + break; + } + + default: + break; + } +} + +double ConLiterToGallon(double fluid, int startingUnit, int endingUnit) { + switch (startingUnit) + { + case 0: //l to x + switch (endingUnit) + { + case 0: //l to l + return fluid; + break; + + case 1: //l to gallon + return fluid * 0.264172; + break; + + default: + break; + } + + case 1: //gallon to x + switch (endingUnit) + { + case 0: //gallon to l + return fluid * 3.78541; + break; + + case 1: //gallon to gallon + return fluid; + break; + + default: + break; + } + + default: + break; + } +} + +double ConData(double data, int startingUnit, int endingUnit) { + switch (startingUnit) + {//'B', 'KB', 'MB', 'GB', 'TB', 'PT' + case 0: //B to x + switch (endingUnit) + { + case 0: //1 + return data; + break; + + case 1: //0.001 + return data / 1000; + break; + + case 2: //0.000001 + return data / 1000000; + break; + + case 3: //0.000000001 + return data / 1000000000; + break; + + case 4: //0.000000000001 + return data / 1000000000000; + break; + + case 5: //0.000000000000001 + return data / 1000000000000000; + break; + + default: + break; + } + + case 1: //KB to x + switch (endingUnit) + { + case 0: //1000 + return data * 1000; + break; + + case 1: //1 + return data; + break; + + case 2: //0.001 + return data / 1000; + break; + + case 3: //0.000001 + return data / 1000000; + break; + case 4: //0.000000001 + return data / 1000000000; + break; + + case 5: //0.000000000001 + return data / 1000000000000; + break; + + default: + break; + } + + case 2: //MB to x + switch (endingUnit) + { + case 0: //0.000001 + return data * 1000000; + break; + + case 1: //0.001 + return data * 1000; + break; + + case 2: //1 + return data; + break; + + case 3: //0.001 + return data / 1000; + break; + + case 4: //0.000001 + return data / 1000000; + break; + + case 5: //0.000000001 + return data / 1000000000; + break; + + default: + break; + } + + + case 3: //GB to x + switch (endingUnit) + { + case 0: //0.000000001 + return data * 1000000000; + break; + + case 1: //0.000001 + return data * 1000000; + break; + + case 2: //1000 + return data * 1000;; + break; + + case 3: //1 + return data; + break; + + case 4: //0.001 + return data / 1000; + break; + + case 5: //0.000001 + return data / 1000000; + break; + + default: + break; + } + + + case 4: //TB to x + switch (endingUnit) + { + case 0: //0.000000000001 + return data * 1000000000000; + break; + + case 1: //0.000000001 + return data * 1000000000; + break; + + case 2: //1000000 + return data * 1000000;; + break; + + case 3: //1000 + return data * 1000; + break; + + case 4: //1 + return; + break; + + case 5: //0.001 + return data / 1000; + break; + + default: + break; + } + + + case 5: //PB to x + switch (endingUnit) + { + case 0: //0.000000000000001 + return data * 1000000000000000; + break; + + case 1: //0.000000000001 + return data * 1000000000000; + break; + + case 2: //1000000000 + return data * 1000000000;; + break; + + case 3: //1000000 + return data * 1000000; + break; + + case 4: //1000 + return data * 1000; + break; + + case 5: //1 + return data; + break; + + default: + break; + } + } +} + +double ConVolume(double volum, int startingUnit, int endingUnit) { + switch (startingUnit) + { + case 0: //mm to x + switch (endingUnit) + { + case 0: //1mm + return volum; + break; + + case 1: //0.001cm + return volum / 1000; + break; + + case 2: //0.000000001m + return volum / 1000000000; + break; + + case 3: //0.000000000000001km + return volum / 1000000000000000000; + break; + + default: + break; + } + + case 1: //cm to x + switch (endingUnit) + { + case 0: //1000 + return volum * 1000; + break; + + case 1: //1 + return volum; + break; + + case 2: //0.000001 + return volum / 1000000; + break; + + case 3: //0.0000000000001 + return volum / 1000000000000000; + break; + + default: + break; + } + + case 2: //m to x + switch (endingUnit) + { + case 0: //100000000 + return volum * 1000000000; + break; + + case 1: //1000000 + return volum * 1000000; + break; + + case 2: //1 + return volum; + break; + + case 3: //0.000000001 + return volum / 1000000000; + break; + + default: + break; + } + + case 3:// km to x + switch (endingUnit) + { + case 0: // 1000000000000000000 + return volum * 1000000000000000000; + break; + + case 1: // 1000000000000000 + return volum * 1000000000000000; + break; + + case 2: // 1000000000 m + return volum * 1000000000; + break; + + case 3: //1 km + return volum; + break; + + default: + break; + } + + default: + break; + } +} +double ConClock(double time, int startingUnit, int endingUnit) { + switch (startingUnit) + { + case 0: //24 to x + switch (endingUnit) + { + case 0: //24 to 24 + return time; + break; + + case 1: //24 to 12 + if (time > 12) { + return time -12; + } + + else { + return time + } + break; + + default: + break; + } + + case 1: //12 to x + switch (endingUnit) + { + case 0: //12 to 24 + return time + 12; + break; + + case 1: //12 to 12 + return time; + break; + + default: + break; + } + + default: + break; + } +} + +double ConTime(double time, int startingUnit, int endingUnit) { + switch (startingUnit) + {//'ms', 's', 'min', 'h', 'd', 'w', 'mon', 'y' + case 0: //ms to x + switch (endingUnit) + { + case 0: //ms + return time; + break; + + case 1: //s + return time / 1000; + break; + + case 2: //min + return time / (1000 * 60); + break; + + case 3: //h + return time / (1000 * 60 * 60); + break; + + case 4: //d + return time / (1000 * 60 * 60 * 24); + break; + + case 5: //w + return time / (1000 * 60 * 60 * 24 * 7); + break; + + case 6: //mon + return time / (1000 * 60 * 60 * 24 * 7 * 30); + break; + + case 7: //y + return time / (1000 * 60 * 60 * 24 * 7 * 30 * 12); + break; + + default: + break; + } + + case 1: //s to x + switch (endingUnit) + { + case 0: //ms + return time * 1000; + break; + + case 1: //s + return time; + break; + + case 2: //min + return time / 60; + break; + + case 3: //h + return time / (60 * 60); + break; + + case 4: //d + return time / (60 * 60 * 24); + break; + + case 5: //w + return time / (60 * 60 * 24 * 7); + break; + + case 6: //mon + return time / (60 * 60 * 24 * 7 * 30); + break; + + case 7: //y + return time / (60 * 60 * 24 * 7 * 30 * 12); + break; + + default: + break; + } + + case 2: //min to x + switch (endingUnit) + { + case 0: //ms + return time * 1000; + break; + + case 1: //s + return time * 1000 * 60; + break; + + case 2: //min + return time; + break; + + case 3: //h + return time / 60; + break; + + case 4: //d + return time / (60 * 24); + break; + + case 5: //w + return time / (60 * 24 * 7); + break; + + case 6: //mon + return time / (60 * 24 * 7 * 4); + break; + + case 7: //y + return time / 60 * 24 * 7 * 4 * 12); + break; + + default: + break; + } + + case 3: //h to x + switch (endingUnit) + { + case 0: //ms + return time * 1000 * 60 * 60; + break; + + case 1: //s + return time * 60 * 60; + break; + + case 2: //min + return time * 60; + break; + + case 3: //h + return time; + break; + + case 4: //d + return time / 24; + break; + + case 5: //w + return time / (24 * 7); + break; + + case 6: //mon + return time / (24 * 7 * 4); + break; + + case 7: //y + return time / (24 * 7 * 4 * 12); + break; + + default: + break; + } + + case 4: //d to x + switch (endingUnit) + { + case 0: //ms + return time * 1000 * 60 * 60 * 24; + break; + + case 1: //s + return time * 60 * 60 * 24; + break; + + case 2: //min + return time * 60 * 24; + break; + + case 3: //h + return time * 24; + break; + + case 4: //d + return time; + break; + + case 5: //w + return time / 7; + break; + + case 6: //mon + return time / (7 * 4); + break; + + case 7: //y + return time / (7 * 4 * 12); + break; + + default: + break; + } + + case 5: //w to x + switch (endingUnit) + { + case 0: //ms + return time * 1000 * 60 * 60 * 24 * 7; + break; + + case 1: //s + return time * 60 * 60 * 24 * 7; + break; + + case 2: //min + return time * 60 * 24 * 7; + break; + + case 3: //h + return time * 24 * 7; + break; + + case 4: //d + return time * 7; + break; + + case 5: //w + return time; + break; + + case 6: //mon + return time / 4; + break; + + case 7: //y + return time / (4 * 12); + break; + + default: + break; + } + + case 6: //mon to x + switch (endingUnit) + { + case 0: //ms + return time * 1000 * 60 * 60 * 24 * 7 * 4; + break; + + case 1: //s + return time * 60 * 60 * 24 * 7 * 4; + break; + + case 2: //min + return time * 60 * 24 * 7 * 4; + break; + + case 3: //h + return time * 24 * 7 * 4; + break; + + case 4: //d + return time * 7 * 4; + break; + + case 5: //w + return time * 4; + break; + + case 6: //mon + return time; + break; + + case 7: //y + return time / 12; + break; + + default: + break; + } + + case 7: //y to x + switch (endingUnit) + { + case 0: //ms + return time * 1000 * 60 * 60 * 24 * 7 * 4 * 12; + break; + + case 1: //s + return time * 60 * 60 * 24 * 7 * 4 * 12; + break; + + case 2: //min + return time * 60 * 24 * 7 * 4 * 12; + break; + + case 3: //h + return time * 24 * 7 * 4 * 12; + break; + + case 4: //d + return time * 7 * 4 * 12; + break; + + case 5: //w + return time * 4 * 12; + break; + + case 6: //mon + return time * 12); + break; + + case 7: //y + return time; + break; + //(1000 * 60 * 60 * 24 * 7 * 4 * 12) + default: + break; + } + } +} + + +//.. // graphMode void graphMode() { double x, y; @@ -109,25 +1330,6 @@ void graphMode() { } } -// Programming mode - -void programmingMode() { - - int num1, num2, result; - char operator; - - printf("Enter first integer: "); - scanf("%d", &num1); - - printf("Enter operator (+, -, *, /): "); - scanf(" %c", &operator); - - printf("Enter second integer: "); - scanf("%d", &num2); - -} - - // change mode int mode(int userChoice){ diff --git a/src/main/c/programmingMode.c b/src/main/c/programmingMode.c new file mode 100644 index 0000000..e89a75c --- /dev/null +++ b/src/main/c/programmingMode.c @@ -0,0 +1,23 @@ +// programmingMode + +#include +#include + +#include "taschenrechner.h" + + +void programmingMode() { + + int num1, num2, result; + char operator; + + printf("Enter first integer: "); + scanf("%d", &num1); + + printf("Enter operator (+, -, *, /): "); + scanf(" %c", &operator); + + printf("Enter second integer: "); + scanf("%d", &num2); + +} diff --git a/src/main/c/taschenrechner.h b/src/main/c/taschenrechner.h index 6382ac0..78ef6a1 100644 --- a/src/main/c/taschenrechner.h +++ b/src/main/c/taschenrechner.h @@ -56,4 +56,34 @@ int mode(int userChoice); int displayMenu(); -#endif // TASCHENRECHNER_H +//Conversion Functions +double ConMeter(double meter, int startingUnit, int endingUnit); + +double ConMeterToFoot(double distance, int startingUnit, int endingUnit); + +double ConKilometerToMiles(double distance, int startingUnit, int endingUnit); + +double ConGram(double weight, int startingUnit, int endingUnit); + +double ConGramToPounds(double weight, int startingUnit, int endingUnit); + +double ConTemp(double temp, int startingUnit, int endingUnit); + +double ConSpeed(double speed, int startingUnit, int endingUnit); + +double ConLiter(double liter, int startingUnit, int endingUnit); + +double ConLiterToGallon(double fluid, int startingUnit, int endingUnit); + +double ConData(double data, int startingUnit, int endingUnit); + +double ConArea(double area, int startingUnit, int endingUnit); + +double ConVolume(double volum, int startingUnit, int endingUnit); + +double ConClock(double time, int startingUnit, int endingUnit); + +double ConTime(double time, int startingUnit, int endingUnit); + + +#endif // TASCHENRECHNER_H From 5944e0daae382f49aa6537b0fe3887cc149ab666 Mon Sep 17 00:00:00 2001 From: fdai7782 Date: Tue, 6 Feb 2024 15:58:22 +0000 Subject: [PATCH 052/125] Added unittest for squareRootFunction --- src/test/c/test_taschenrechner.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/test/c/test_taschenrechner.c b/src/test/c/test_taschenrechner.c index cf6c739..a5dcd59 100644 --- a/src/test/c/test_taschenrechner.c +++ b/src/test/c/test_taschenrechner.c @@ -109,5 +109,10 @@ void test_ConTime(void) {//5 ms to s } +// Square root function +void test_squareRootFunction(void) { + TEST_ASSERT_EQUAL_FLOAT(2.0, squareRootFunction(4.0)); +} + #endif // TEST From 1f820feab0a6f3a58588105a0a4a11e9dee11653 Mon Sep 17 00:00:00 2001 From: fdai7782 Date: Tue, 6 Feb 2024 16:00:23 +0000 Subject: [PATCH 053/125] Added unittest for sineFunction --- src/test/c/test_taschenrechner.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/test/c/test_taschenrechner.c b/src/test/c/test_taschenrechner.c index a5dcd59..d369a47 100644 --- a/src/test/c/test_taschenrechner.c +++ b/src/test/c/test_taschenrechner.c @@ -114,5 +114,10 @@ void test_squareRootFunction(void) { TEST_ASSERT_EQUAL_FLOAT(2.0, squareRootFunction(4.0)); } +// Sine function +void test_sineFunction(void) { + // Your test code here + TEST_ASSERT_EQUAL_FLOAT(0.0, sineFunction(0.0)); +} #endif // TEST From c387f1ba77c374a41d3902eb3e4a50fa35215192 Mon Sep 17 00:00:00 2001 From: fdai7782 Date: Tue, 6 Feb 2024 16:02:08 +0000 Subject: [PATCH 054/125] Added unittest for cosineFunction --- src/test/c/test_taschenrechner.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/test/c/test_taschenrechner.c b/src/test/c/test_taschenrechner.c index d369a47..eae1acc 100644 --- a/src/test/c/test_taschenrechner.c +++ b/src/test/c/test_taschenrechner.c @@ -120,4 +120,12 @@ void test_sineFunction(void) { TEST_ASSERT_EQUAL_FLOAT(0.0, sineFunction(0.0)); } +// Cosine function +void test_cosineFunction(void) { + // Your test code here + TEST_ASSERT_EQUAL_FLOAT(1.0, cosineFunction(0.0)); +} + + + #endif // TEST From f01a7070b9b2190a288234ed55049058ba623ee8 Mon Sep 17 00:00:00 2001 From: fdai7782 Date: Tue, 6 Feb 2024 16:03:39 +0000 Subject: [PATCH 055/125] Added unittest for tangentFunction --- src/test/c/test_taschenrechner.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/test/c/test_taschenrechner.c b/src/test/c/test_taschenrechner.c index eae1acc..e3b4388 100644 --- a/src/test/c/test_taschenrechner.c +++ b/src/test/c/test_taschenrechner.c @@ -126,6 +126,10 @@ void test_cosineFunction(void) { TEST_ASSERT_EQUAL_FLOAT(1.0, cosineFunction(0.0)); } - +// Tangent function +void test_tangentFunction(void) { + // Your test code here + TEST_ASSERT_EQUAL_FLOAT(0.0, tangentFunction(0.0)); +} #endif // TEST From 1512e1941981a707136827c7a243fd3d5704868f Mon Sep 17 00:00:00 2001 From: fdai7782 Date: Tue, 6 Feb 2024 16:05:12 +0000 Subject: [PATCH 056/125] Added unittest for logarithmFunction --- src/test/c/test_taschenrechner.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/test/c/test_taschenrechner.c b/src/test/c/test_taschenrechner.c index e3b4388..2bdfaf1 100644 --- a/src/test/c/test_taschenrechner.c +++ b/src/test/c/test_taschenrechner.c @@ -132,4 +132,11 @@ void test_tangentFunction(void) { TEST_ASSERT_EQUAL_FLOAT(0.0, tangentFunction(0.0)); } +// Logarithm function +void test_logarithmFunction(void) { + // Your test code here + TEST_ASSERT_EQUAL_FLOAT(1.0, logarithmFunction(10.0)); +} + + #endif // TEST From bd0ea51f78bae0bd143ac88ffabdcfbe0486b45c Mon Sep 17 00:00:00 2001 From: fdai7782 Date: Tue, 6 Feb 2024 16:07:09 +0000 Subject: [PATCH 057/125] Added unittest for naturalLogarithmFunction --- src/test/c/test_taschenrechner.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/test/c/test_taschenrechner.c b/src/test/c/test_taschenrechner.c index 2bdfaf1..f3f7517 100644 --- a/src/test/c/test_taschenrechner.c +++ b/src/test/c/test_taschenrechner.c @@ -138,5 +138,10 @@ void test_logarithmFunction(void) { TEST_ASSERT_EQUAL_FLOAT(1.0, logarithmFunction(10.0)); } +// Natural logarithm function +void test_naturalLogarithmFunction(void) { + // Your test code here + TEST_ASSERT_EQUAL_FLOAT(0.0, naturalLogarithmFunction(1.0)); +} #endif // TEST From 44d67a7e70c81d5bb167a02686d8d052ccf155e0 Mon Sep 17 00:00:00 2001 From: fdai7782 Date: Tue, 6 Feb 2024 16:08:39 +0000 Subject: [PATCH 058/125] Added unittest for logarithmBase2Function --- src/test/c/test_taschenrechner.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/test/c/test_taschenrechner.c b/src/test/c/test_taschenrechner.c index f3f7517..d67d94a 100644 --- a/src/test/c/test_taschenrechner.c +++ b/src/test/c/test_taschenrechner.c @@ -144,4 +144,11 @@ void test_naturalLogarithmFunction(void) { TEST_ASSERT_EQUAL_FLOAT(0.0, naturalLogarithmFunction(1.0)); } +// Logarithm with base 2 function +void test_logarithmBase2Function(void) { + // Your test code here + TEST_ASSERT_EQUAL_FLOAT(3.0, logarithmBase2Function(8.0)); +} + + #endif // TEST From 8e56ff972e7cf1b6c3e7eda88aa47f28d24e8c2f Mon Sep 17 00:00:00 2001 From: fdai7782 Date: Tue, 6 Feb 2024 16:10:16 +0000 Subject: [PATCH 059/125] Added unittest for exponentialFunction --- src/test/c/test_taschenrechner.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/test/c/test_taschenrechner.c b/src/test/c/test_taschenrechner.c index d67d94a..f51aaad 100644 --- a/src/test/c/test_taschenrechner.c +++ b/src/test/c/test_taschenrechner.c @@ -150,5 +150,10 @@ void test_logarithmBase2Function(void) { TEST_ASSERT_EQUAL_FLOAT(3.0, logarithmBase2Function(8.0)); } +// Exponential function +void test_exponentialFunction(void) { + // Your test code here + TEST_ASSERT_EQUAL_FLOAT(1.0, exponentialFunction(0.0)); +} #endif // TEST From de0436173724344a317656693f21de17d058efdc Mon Sep 17 00:00:00 2001 From: fdai7782 Date: Tue, 6 Feb 2024 16:52:31 +0000 Subject: [PATCH 060/125] refactoring: Extracted the logarithm function from the scientificMode and moved in the executeScientificFunction --- src/main/c/scientificMode.c | 67 ++++++++++++++++++++----------------- 1 file changed, 36 insertions(+), 31 deletions(-) diff --git a/src/main/c/scientificMode.c b/src/main/c/scientificMode.c index 88b69f7..a95495e 100644 --- a/src/main/c/scientificMode.c +++ b/src/main/c/scientificMode.c @@ -4,6 +4,41 @@ #include #include "taschenrechner.h" +// Logarithm +void executeLogarithmFunction(double num) { + int logChoice; + + do { + printf("Logarithm Options:\n"); + printf("1: Logarithm (base 10)\n"); + printf("2: Natural Logarithm (ln)\n"); + printf("3: Logarithm (base 2)\n"); + printf("0: Exit Logarithm Menu\n"); + scanf("%d", &logChoice); + + switch (logChoice) { + case 1: // Logarithm (base 10) + printf("Result: %lf\n", logarithmFunction(num)); + break; + + case 2: // Natural Logarithm (ln) + printf("Result: %lf\n", naturalLogarithmFunction(num)); + break; + + case 3: // Logarithm (base 2) + printf("Result: %lf\n", logarithmBase2Function(num)); + break; + + case 0: // Exit the logarithm menu + break; + + default: + printf("Invalid logarithm function choice. Please try again.\n"); + } + } while (logChoice != 0); +} + + int scientificMode(){ double num, result; @@ -37,37 +72,7 @@ int scientificMode(){ break; case 3: // Logarithm - do { - printf("Logarithm Options:\n"); - printf("1: Logarithm (base 10)\n"); - printf("2: Natural Logarithm (ln)\n"); - printf("3: Logarithm (base 2)\n"); - printf("0: Exit Logarithm Menu\n"); - scanf("%d", &logChoice); - - switch(logChoice) { - case 1: // Logarithm (base 10) - result = logarithmFunction(num); - printf("Result: %lf\n", result); - break; - - case 2: // Natural Logarithm (ln) - result = naturalLogarithmFunction(num); - printf("Result: %lf\n", result); - break; - - case 3: // Logarithm (base 2) - result = logarithmBase2Function(num); - printf("Result: %lf\n", result); - break; - - case 0: // Exit the logarithm menu - break; - - default: - printf("Invalid logarithm function choice. Please try again.\n"); - } - } while (logChoice != 0); + executeLogarithmFunction(num); break; case 4: // Trigonometric From 54d7fbb0f634723f560d93d3b024d8ecc98b4117 Mon Sep 17 00:00:00 2001 From: fdai7782 Date: Tue, 6 Feb 2024 17:06:23 +0000 Subject: [PATCH 061/125] refactoring: Extracted the trigonometric function from the scientificMode and moved in the executeTrigonometricFunction --- src/main/c/scientificMode.c | 66 ++++++++++++++++++++----------------- 1 file changed, 35 insertions(+), 31 deletions(-) diff --git a/src/main/c/scientificMode.c b/src/main/c/scientificMode.c index a95495e..ddf2c7e 100644 --- a/src/main/c/scientificMode.c +++ b/src/main/c/scientificMode.c @@ -38,6 +38,40 @@ void executeLogarithmFunction(double num) { } while (logChoice != 0); } +// Trigonometric +void executeTrigonometricFunction(double num) { + int trigChoice; + + do { + printf("Trigonometric functions:\n"); + printf("1: Sine\n"); + printf("2: Cosine\n"); + printf("3: Tangent\n"); + printf("0: Exit Trigonometric Menu\n"); + scanf("%d", &trigChoice); + + switch (trigChoice) { + case 1: // Sine + printf("Result: %lf\n", sineFunction(num)); + break; + + case 2: // Cosine + printf("Result: %lf\n", cosineFunction(num)); + break; + + case 3: // Tangent + printf("Result: %lf\n", tangentFunction(num)); + break; + + case 0: // Exit the trigonometric menu + break; + + default: + printf("Invalid trigonometric function choice. Please try again.\n"); + } + } while (trigChoice != 0); +} + int scientificMode(){ @@ -76,37 +110,7 @@ int scientificMode(){ break; case 4: // Trigonometric - do { - printf("Trigonometric functions:\n"); - printf("1: Sine\n"); - printf("2: Cosine\n"); - printf("3: Tangent\n"); - printf("0: Exit Trigonometric Menu\n"); - scanf("%d", &trigChoice); - - switch(trigChoice) { - case 1: // Sine - result = sineFunction(num); - printf("Result: %lf\n", result); - break; - - case 2: // Cosine - result = cosineFunction(num); - printf("Result: %lf\n", result); - break; - - case 3: // Tangent - result = tangentFunction(num); - printf("Result: %lf\n", result); - break; - - case 0: // Exit the trigonometric menu - break; - - default: - printf("Invalid trigonometric function choice. Please try again.\n"); - } - } while (trigChoice != 0); + executeTrigonometricFunction(num); break; case 0: // Exit the loop From 4518b70777905fbf7e476ac4bc5ac38fc2ef3e03 Mon Sep 17 00:00:00 2001 From: fdai7782 Date: Tue, 6 Feb 2024 17:21:10 +0000 Subject: [PATCH 062/125] refactoring: Extracted the logarithm options from the executeLogarithmFunction and move them into getLogarithmChoice function --- src/main/c/scientificMode.c | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/src/main/c/scientificMode.c b/src/main/c/scientificMode.c index ddf2c7e..0a7d37a 100644 --- a/src/main/c/scientificMode.c +++ b/src/main/c/scientificMode.c @@ -4,17 +4,26 @@ #include #include "taschenrechner.h" +// Choice for Logarithm +int getLogarithmChoice() { + int logChoice; + printf("Logarithm Options:\n"); + printf("1: Logarithm (base 10)\n"); + printf("2: Natural Logarithm (ln)\n"); + printf("3: Logarithm (base 2)\n"); + printf("0: Exit Logarithm Menu\n"); + scanf("%d", &logChoice); + return logChoice; +} + + // Logarithm void executeLogarithmFunction(double num) { int logChoice; do { - printf("Logarithm Options:\n"); - printf("1: Logarithm (base 10)\n"); - printf("2: Natural Logarithm (ln)\n"); - printf("3: Logarithm (base 2)\n"); - printf("0: Exit Logarithm Menu\n"); - scanf("%d", &logChoice); + + logChoice = getLogarithmChoice(); switch (logChoice) { case 1: // Logarithm (base 10) From 98e8d6af3dcf0fd980a721f34e11a6dcea1ca01f Mon Sep 17 00:00:00 2001 From: fdai7782 Date: Tue, 6 Feb 2024 17:24:25 +0000 Subject: [PATCH 063/125] refactoring: Extracted the trigonometric options from the executeTrigonometricFunction and move them into getTrigonometricChoice --- src/main/c/scientificMode.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/src/main/c/scientificMode.c b/src/main/c/scientificMode.c index 0a7d37a..3e025f8 100644 --- a/src/main/c/scientificMode.c +++ b/src/main/c/scientificMode.c @@ -16,6 +16,17 @@ int getLogarithmChoice() { return logChoice; } +int getTrigonometricChoice() { + int trigChoice; + printf("Trigonometric functions:\n"); + printf("1: Sine\n"); + printf("2: Cosine\n"); + printf("3: Tangent\n"); + printf("0: Exit Trigonometric Menu\n"); + scanf("%d", &trigChoice); + return trigChoice; +} + // Logarithm void executeLogarithmFunction(double num) { @@ -52,12 +63,8 @@ void executeTrigonometricFunction(double num) { int trigChoice; do { - printf("Trigonometric functions:\n"); - printf("1: Sine\n"); - printf("2: Cosine\n"); - printf("3: Tangent\n"); - printf("0: Exit Trigonometric Menu\n"); - scanf("%d", &trigChoice); + + trigChoice = getTrigonometricChoice(); switch (trigChoice) { case 1: // Sine From b6f841deb2f50ef14adf3d2f47b86cdeece0936f Mon Sep 17 00:00:00 2001 From: fdai7782 Date: Tue, 6 Feb 2024 17:33:24 +0000 Subject: [PATCH 064/125] refactoring: Extracted the scientific options from the scientificMode and move them into getScientificModeChoice --- src/main/c/scientificMode.c | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/src/main/c/scientificMode.c b/src/main/c/scientificMode.c index 3e025f8..09fbc19 100644 --- a/src/main/c/scientificMode.c +++ b/src/main/c/scientificMode.c @@ -4,6 +4,19 @@ #include #include "taschenrechner.h" +// Choice for ScientificMode +int getScientificModeChoice() { + int choice; + printf("Scientific mode Options:\n"); + printf("1: Square root\n"); + printf("2: Exponential\n"); + printf("3: Logarithm\n"); + printf("4: Trigonometric\n"); + printf("0: Exit\n"); + scanf("%d", &choice); + return choice; +} + // Choice for Logarithm int getLogarithmChoice() { int logChoice; @@ -16,6 +29,7 @@ int getLogarithmChoice() { return logChoice; } +// Choice for Trigonomtri int getTrigonometricChoice() { int trigChoice; printf("Trigonometric functions:\n"); @@ -99,13 +113,7 @@ int scientificMode(){ printf("Enter a number: "); scanf("%lf", &num); // scan the number from the user - printf("Scientific mode Options:\n"); - printf("1: Square root\n"); - printf("2: Exponential\n"); - printf("3: Logarithm\n"); - printf("4: Trigonometric\n"); - printf("0: Exit\n"); - scanf("%d", &choice); // user choice + choice = getScientificModeChoice(); int logChoice, trigChoice; // Move the initialization outside the loops From cb1e99442f50c9c73852b3363c0f89a71f79405f Mon Sep 17 00:00:00 2001 From: fdai7782 Date: Tue, 6 Feb 2024 18:47:21 +0000 Subject: [PATCH 065/125] refactoring: Split scientificMode into two functions: scientificMode (for setup) and executeScientificFunction (handling switch case and result output). Also, isolated user's calculation choice into getNumberFromUser. --- src/main/c/scientificMode.c | 74 ++++++++++++++++++++----------------- 1 file changed, 40 insertions(+), 34 deletions(-) diff --git a/src/main/c/scientificMode.c b/src/main/c/scientificMode.c index 09fbc19..31cd161 100644 --- a/src/main/c/scientificMode.c +++ b/src/main/c/scientificMode.c @@ -4,6 +4,14 @@ #include #include "taschenrechner.h" +// get the number which has to be calculated +double getNumberFromUser() { + double num; + printf("Enter a number: "); + scanf("%lf", &num); + return num; +} + // Choice for ScientificMode int getScientificModeChoice() { int choice; @@ -103,49 +111,47 @@ void executeTrigonometricFunction(double num) { } -int scientificMode(){ - - double num, result; - - int choice; - - do { - printf("Enter a number: "); - scanf("%lf", &num); // scan the number from the user - - choice = getScientificModeChoice(); +void executeScientificFunction(double num, int choice) { + double result; - int logChoice, trigChoice; // Move the initialization outside the loops + switch (choice) { + case 1: // Square root + result = squareRootFunction(num); + printf("Result: %lf\n", result); + break; - switch(choice) { + case 2: // Exponential + result = exponentialFunction(num); + printf("Result: %lf\n", result); + break; - case 1: // Square root - result = squareRootFunction(num); - printf("Result: %lf\n", result); - break; + case 3: // Logarithm + executeLogarithmFunction(num); + break; - case 2: // Exponential - result = exponentialFunction(num); - printf("Result: %lf\n", result); - break; + case 4: // Trigonometric + executeTrigonometricFunction(num); + break; - case 3: // Logarithm - executeLogarithmFunction(num); - break; + case 0: // Exit the loop + break; - case 4: // Trigonometric - executeTrigonometricFunction(num); - break; - - case 0: // Exit the loop - break; + default: + printf("Invalid choice. Please try again.\n"); + } +} - default: - printf("Invalid choice. Please try again.\n"); - } +// scientificMode +double scientificMode() { + double result; + int choice; + do { + double num = getNumberFromUser(); + choice = getScientificModeChoice(); + executeScientificFunction(num, choice); } while (choice != 0); return result; -} +} \ No newline at end of file From 17a672a58bc28fe553ea595587e0b4327b8423d9 Mon Sep 17 00:00:00 2001 From: fdai7782 Date: Tue, 6 Feb 2024 19:02:26 +0000 Subject: [PATCH 066/125] Added functioninality in the programmingMode --- src/main/c/programmingMode.c | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/src/main/c/programmingMode.c b/src/main/c/programmingMode.c index e89a75c..c869b99 100644 --- a/src/main/c/programmingMode.c +++ b/src/main/c/programmingMode.c @@ -7,7 +7,6 @@ void programmingMode() { - int num1, num2, result; char operator; @@ -20,4 +19,30 @@ void programmingMode() { printf("Enter second integer: "); scanf("%d", &num2); -} + // Calculation + switch (operator) { + case '+': + result = num1 + num2; + break; + case '-': + result = num1 - num2; + break; + case '*': + result = num1 * num2; + break; + case '/': + if (num2 != 0) { + result = num1 / num2; + } else { + printf("Error: Division by zero\n"); + result = 0; + } + break; + default: + printf("Invalid operator\n"); + result = 0; + } + + // Display the result + printf("Result: %d\n", result); +} \ No newline at end of file From db3b1e33e982a25c55826ad2c8dd940650e35d65 Mon Sep 17 00:00:00 2001 From: fdai7782 Date: Tue, 6 Feb 2024 19:20:17 +0000 Subject: [PATCH 067/125] refactoring: Extracted all the operations from the programmingMode and move them into performOperation --- src/main/c/programmingMode.c | 48 ++++++++++++++++++------------------ 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/src/main/c/programmingMode.c b/src/main/c/programmingMode.c index c869b99..42c5c61 100644 --- a/src/main/c/programmingMode.c +++ b/src/main/c/programmingMode.c @@ -5,6 +5,27 @@ #include "taschenrechner.h" +// Calculation +int performOperation(int num1, char operator, int num2) { + switch (operator) { + case '+': + return num1 + num2; + case '-': + return num1 - num2; + case '*': + return num1 * num2; + case '/': + if (num2 != 0) { + return num1 / num2; + } else { + printf("Error: Division by zero\n"); + return 0; + } + default: + printf("Invalid operator\n"); + return 0; + } +} void programmingMode() { int num1, num2, result; @@ -19,30 +40,9 @@ void programmingMode() { printf("Enter second integer: "); scanf("%d", &num2); - // Calculation - switch (operator) { - case '+': - result = num1 + num2; - break; - case '-': - result = num1 - num2; - break; - case '*': - result = num1 * num2; - break; - case '/': - if (num2 != 0) { - result = num1 / num2; - } else { - printf("Error: Division by zero\n"); - result = 0; - } - break; - default: - printf("Invalid operator\n"); - result = 0; - } + // Calculation + Display the result - // Display the result + result = performOperation(num1, operator, num2); + printf("Result: %d\n", result); } \ No newline at end of file From 941e7584b7eb78b0c890fea7cea4f5b4772e0fc2 Mon Sep 17 00:00:00 2001 From: fdai7782 Date: Tue, 6 Feb 2024 19:28:41 +0000 Subject: [PATCH 068/125] refactoring: made an extra function(getIntegerInput) which helps read and print user value in a single step --- src/main/c/programmingMode.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/main/c/programmingMode.c b/src/main/c/programmingMode.c index 42c5c61..a5effcc 100644 --- a/src/main/c/programmingMode.c +++ b/src/main/c/programmingMode.c @@ -5,6 +5,14 @@ #include "taschenrechner.h" +// get the NUmbers from the user +int getIntegerInput(const char* prompt) { + int num; + printf("%s", prompt); + scanf("%d", &num); + return num; +} + // Calculation int performOperation(int num1, char operator, int num2) { switch (operator) { @@ -31,14 +39,12 @@ void programmingMode() { int num1, num2, result; char operator; - printf("Enter first integer: "); - scanf("%d", &num1); + num1 = getIntegerInput("Enter first integer: "); printf("Enter operator (+, -, *, /): "); scanf(" %c", &operator); - printf("Enter second integer: "); - scanf("%d", &num2); + num2 = getIntegerInput("Enter second integer: "); // Calculation + Display the result From a1cd5bd996e0b8ceae2e7abdd001ddf28314697b Mon Sep 17 00:00:00 2001 From: fdai7782 Date: Tue, 6 Feb 2024 19:31:47 +0000 Subject: [PATCH 069/125] refactoring: made an extra function(getOperatorInput) which helps read and print user's operation value in a single step --- src/main/c/programmingMode.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/main/c/programmingMode.c b/src/main/c/programmingMode.c index a5effcc..6a63556 100644 --- a/src/main/c/programmingMode.c +++ b/src/main/c/programmingMode.c @@ -13,6 +13,14 @@ int getIntegerInput(const char* prompt) { return num; } +// Display the diffrent operations and scan them +char getOperatorInput() { + char operator; + printf("Enter operator (+, -, *, /): "); + scanf(" %c", &operator); + return operator; +} + // Calculation int performOperation(int num1, char operator, int num2) { switch (operator) { @@ -40,10 +48,7 @@ void programmingMode() { char operator; num1 = getIntegerInput("Enter first integer: "); - - printf("Enter operator (+, -, *, /): "); - scanf(" %c", &operator); - + operator = getOperatorInput(); num2 = getIntegerInput("Enter second integer: "); // Calculation + Display the result From 71d68f6b050bac80ffb53e4ce0c08ace640ca4ad Mon Sep 17 00:00:00 2001 From: fdai7782 Date: Tue, 6 Feb 2024 19:43:38 +0000 Subject: [PATCH 070/125] refactoring: Removed the intermediate 'result' variable and directly printed the output using the performOperation function. --- src/main/c/programmingMode.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/main/c/programmingMode.c b/src/main/c/programmingMode.c index 6a63556..e4c2b8d 100644 --- a/src/main/c/programmingMode.c +++ b/src/main/c/programmingMode.c @@ -44,16 +44,12 @@ int performOperation(int num1, char operator, int num2) { } void programmingMode() { - int num1, num2, result; - char operator; - num1 = getIntegerInput("Enter first integer: "); - operator = getOperatorInput(); - num2 = getIntegerInput("Enter second integer: "); + int num1 = getIntegerInput("Enter first integer: "); + char operator = getOperatorInput(); + int num2 = getIntegerInput("Enter second integer: "); // Calculation + Display the result - result = performOperation(num1, operator, num2); - - printf("Result: %d\n", result); + printf("Result: %d\n", performOperation(num1, operator, num2)); } \ No newline at end of file From d3f2d7ec6b0db70895a3568608827bd8a157e96e Mon Sep 17 00:00:00 2001 From: fdai7782 Date: Wed, 7 Feb 2024 15:46:08 +0000 Subject: [PATCH 071/125] Added unittest for the test case in to check the performOperation function's ability to perform addition. Includes arranging operands, performing addition, and asserting the expected result. --- src/test/c/test_taschenrechner.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/test/c/test_taschenrechner.c b/src/test/c/test_taschenrechner.c index f51aaad..65e544f 100644 --- a/src/test/c/test_taschenrechner.c +++ b/src/test/c/test_taschenrechner.c @@ -156,4 +156,18 @@ void test_exponentialFunction(void) { TEST_ASSERT_EQUAL_FLOAT(1.0, exponentialFunction(0.0)); } +// addition with two numbers +void test_performOperation_Addition(void) { + // Arrange + int result; + + // Act + result = performOperation(5, '+', 3); + + // Assert + TEST_ASSERT_EQUAL_INT(8, result); +} + + + #endif // TEST From 4152c3894edd0fc636231f82345d3ddbbaf6e790 Mon Sep 17 00:00:00 2001 From: fdai7782 Date: Wed, 7 Feb 2024 15:47:42 +0000 Subject: [PATCH 072/125] Added unittest for the test case in to check the performOperation function's ability to perform subtraction. Includes arranging operands, performing subtraction, and asserting the expected result. --- src/test/c/test_taschenrechner.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/test/c/test_taschenrechner.c b/src/test/c/test_taschenrechner.c index 65e544f..75a0bd3 100644 --- a/src/test/c/test_taschenrechner.c +++ b/src/test/c/test_taschenrechner.c @@ -168,6 +168,16 @@ void test_performOperation_Addition(void) { TEST_ASSERT_EQUAL_INT(8, result); } +// Test case for subtraction +void test_performOperation_Subtraction(void) { + // Arrange + int result; + + // Act + result = performOperation(10, '-', 3); + // Assert + TEST_ASSERT_EQUAL_INT(7, result); +} #endif // TEST From 0436d72f1e4ac7697d7e0564c7fa547154163fae Mon Sep 17 00:00:00 2001 From: fdai7782 Date: Wed, 7 Feb 2024 15:51:09 +0000 Subject: [PATCH 073/125] Added unittest for the case in to check the performOperation function's ability to perform multiplication. Includes arranging operands, performing multiplication, and asserting the expected result. --- src/test/c/test_taschenrechner.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/test/c/test_taschenrechner.c b/src/test/c/test_taschenrechner.c index 75a0bd3..38ccd8e 100644 --- a/src/test/c/test_taschenrechner.c +++ b/src/test/c/test_taschenrechner.c @@ -180,4 +180,16 @@ void test_performOperation_Subtraction(void) { TEST_ASSERT_EQUAL_INT(7, result); } +// Test case for multiplication +void test_performOperation_Multiplication(void) { + // Arrange + int result; + + // Act + result = performOperation(4, '*', 6); + + // Assert + TEST_ASSERT_EQUAL_INT(24, result); +} + #endif // TEST From 283834c8f6c6e302ab522bb2a4f47583098ad6e8 Mon Sep 17 00:00:00 2001 From: fdai7782 Date: Wed, 7 Feb 2024 16:02:27 +0000 Subject: [PATCH 074/125] Added unittest for the case in to check the performOperation function's ability to perform division. Includes arranging operands, performing division, and asserting the expected result. --- src/test/c/test_taschenrechner.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/test/c/test_taschenrechner.c b/src/test/c/test_taschenrechner.c index 38ccd8e..39414dd 100644 --- a/src/test/c/test_taschenrechner.c +++ b/src/test/c/test_taschenrechner.c @@ -192,4 +192,16 @@ void test_performOperation_Multiplication(void) { TEST_ASSERT_EQUAL_INT(24, result); } +// Test case for division +void test_performOperation_Division(void) { + // Arrange + int result; + + // Act + result = performOperation(8, '/', 2); + + // Assert + TEST_ASSERT_EQUAL_INT(4, result); +} + #endif // TEST From a6f9a9c078eeceb294838ee5da3d11b94194621c Mon Sep 17 00:00:00 2001 From: fdai7782 Date: Wed, 7 Feb 2024 16:38:00 +0000 Subject: [PATCH 075/125] Added the performOperation function in the calculator.h file --- src/main/c/taschenrechner.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/c/taschenrechner.h b/src/main/c/taschenrechner.h index 78ef6a1..6b7955b 100644 --- a/src/main/c/taschenrechner.h +++ b/src/main/c/taschenrechner.h @@ -85,5 +85,6 @@ double ConClock(double time, int startingUnit, int endingUnit); double ConTime(double time, int startingUnit, int endingUnit); +int performOperation(int num1, char operator, int num2); #endif // TASCHENRECHNER_H From 1325941ee52a12b931cad7b43d2cc780a8032920 Mon Sep 17 00:00:00 2001 From: fdai7782 Date: Wed, 7 Feb 2024 16:55:56 +0000 Subject: [PATCH 076/125] Revert "Added unittest for the test case in to check the performOperation function's ability to perform addition. Includes arranging operands, performing addition, and asserting the expected result." This reverts commit d3f2d7ec6b0db70895a3568608827bd8a157e96e. --- src/test/c/test_taschenrechner.c | 48 -------------------------------- 1 file changed, 48 deletions(-) diff --git a/src/test/c/test_taschenrechner.c b/src/test/c/test_taschenrechner.c index 39414dd..f51aaad 100644 --- a/src/test/c/test_taschenrechner.c +++ b/src/test/c/test_taschenrechner.c @@ -156,52 +156,4 @@ void test_exponentialFunction(void) { TEST_ASSERT_EQUAL_FLOAT(1.0, exponentialFunction(0.0)); } -// addition with two numbers -void test_performOperation_Addition(void) { - // Arrange - int result; - - // Act - result = performOperation(5, '+', 3); - - // Assert - TEST_ASSERT_EQUAL_INT(8, result); -} - -// Test case for subtraction -void test_performOperation_Subtraction(void) { - // Arrange - int result; - - // Act - result = performOperation(10, '-', 3); - - // Assert - TEST_ASSERT_EQUAL_INT(7, result); -} - -// Test case for multiplication -void test_performOperation_Multiplication(void) { - // Arrange - int result; - - // Act - result = performOperation(4, '*', 6); - - // Assert - TEST_ASSERT_EQUAL_INT(24, result); -} - -// Test case for division -void test_performOperation_Division(void) { - // Arrange - int result; - - // Act - result = performOperation(8, '/', 2); - - // Assert - TEST_ASSERT_EQUAL_INT(4, result); -} - #endif // TEST From 55181a2f4c640e21341f649025543ab9ead025bc Mon Sep 17 00:00:00 2001 From: fdai7782 Date: Wed, 7 Feb 2024 17:02:42 +0000 Subject: [PATCH 077/125] Added all the four unittest back in the test_calculator.c file (test_performOperation_Multiplication, test_performOperation_Addition, test_performOperation_Subtraction and test_performOperation_Division) --- src/main/c/taschenrechner.h | 14 ++++++------- src/test/c/test_taschenrechner.c | 36 ++++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+), 7 deletions(-) diff --git a/src/main/c/taschenrechner.h b/src/main/c/taschenrechner.h index 6b7955b..aedb4f3 100644 --- a/src/main/c/taschenrechner.h +++ b/src/main/c/taschenrechner.h @@ -1,22 +1,22 @@ #ifndef TASCHENRECHNER_H #define TASCHENRECHNER_H -//add function +// add function double add(double a, double b); -//minus function +// minus function double minus(double a, double b); -//multiply function +// multiply function double multiply(double a, double b); -//divide function +// divide function double divide(double a, double b); -//get input and check if its a number +// get input and check if its a number double testForNumber(); -//get input and check if its a operator +// get input and check if its a operator char testForOperator(); // Square root function @@ -56,7 +56,7 @@ int mode(int userChoice); int displayMenu(); -//Conversion Functions +// Conversion Functions double ConMeter(double meter, int startingUnit, int endingUnit); double ConMeterToFoot(double distance, int startingUnit, int endingUnit); diff --git a/src/test/c/test_taschenrechner.c b/src/test/c/test_taschenrechner.c index f51aaad..33f7f6c 100644 --- a/src/test/c/test_taschenrechner.c +++ b/src/test/c/test_taschenrechner.c @@ -156,4 +156,40 @@ void test_exponentialFunction(void) { TEST_ASSERT_EQUAL_FLOAT(1.0, exponentialFunction(0.0)); } +// Test case for subtraction +void test_performOperation_Subtraction(void) { + // Arrange + int result; + + // Act + result = performOperation(10, '-', 3); + + // Assert + TEST_ASSERT_EQUAL_INT(7, result); +} + +// Test case for multiplication +void test_performOperation_Multiplication(void) { + // Arrange + int result; + + // Act + result = performOperation(4, '*', 6); + + // Assert + TEST_ASSERT_EQUAL_INT(24, result); +} + +// Test case for division +void test_performOperation_Division(void) { + // Arrange + int result; + + // Act + result = performOperation(8, '/', 2); + + // Assert + TEST_ASSERT_EQUAL_INT(4, result); +} + #endif // TEST From 316f354965b5530cab1751cf6e9137b1f9bdd227 Mon Sep 17 00:00:00 2001 From: fdai7782 Date: Wed, 7 Feb 2024 17:14:40 +0000 Subject: [PATCH 078/125] Added teams.md file --- teams.md | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 teams.md diff --git a/teams.md b/teams.md new file mode 100644 index 0000000..6e0954d --- /dev/null +++ b/teams.md @@ -0,0 +1,6 @@ +- COMMITTER-NAME, FD-NUMMER +- Thomas Papendieck, fdai0127 +- fdai7782, fdai7782 +- Enrico Schellenberger, fdai7766 +- lukazieg, fdai7814 +- Kabrel, fdai7801 From b5bd6ac2c31c2baeccfdeb2f855e2ac2af1742a7 Mon Sep 17 00:00:00 2001 From: fdai7782 Date: Wed, 7 Feb 2024 17:25:22 +0000 Subject: [PATCH 079/125] Update teams.md --- teams.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/teams.md b/teams.md index 6e0954d..e266a4e 100644 --- a/teams.md +++ b/teams.md @@ -1,6 +1,6 @@ - COMMITTER-NAME, FD-NUMMER - Thomas Papendieck, fdai0127 -- fdai7782, fdai7782 +- fdai7782 (Jatin Saroay), fdai7782 - Enrico Schellenberger, fdai7766 - lukazieg, fdai7814 - Kabrel, fdai7801 From eaece18fe91ab97294b630d84c191b86478382d4 Mon Sep 17 00:00:00 2001 From: fdai7782 Date: Wed, 7 Feb 2024 17:25:58 +0000 Subject: [PATCH 080/125] Delete .DS_Store --- .DS_Store | Bin 6148 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 .DS_Store diff --git a/.DS_Store b/.DS_Store deleted file mode 100644 index e2439694bdd372eace2d75cb9b92457b40684d64..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeHK&1%~~5Z<+&M8*_+Xd%aiTn)9I#-;S4xb7*ps5FNrIFe;-QCVv&xq=#l&h6v$ z(iiBxr#w$*c1Nj$lO7urW?=W*ouB>rwCrkx5VF4vJ3=&t5DpZ?N*$_u1npS1q(Yi~ zK#60d^B~p%^nM2OEpJxrA_MsCsv;E&F$(g{?-xgD)^6X(O0~APf8ZQA4d=?6>fFox zY?=1`#V722&^ivvwjX?q#`&=M{GCoRKT5_66A*=CaJjsQl2GS;y-dQ?#Cq1?)SddU zdAM42d#_un+dEme)ap&Q-BPcPd+T-Gd2#ge?fLL?JWKR9OQD3*X5<-R3E!bXyNM?q zZ=`2*4!^3umYE(5=$yi_F3u)Dew}Vw!+%)k)6G$TLs&WA7jKcoI+=i`Tpe0jm;q*h z8Q4Vz=$>*KySO-B6EnaJJSqctKPV`OE@5HOTpduE6acUWY9r9bTmoYhp-Wg;1Ph3? zp@242Qi>sMIOrAmxrBv98!jXzAChL4l%Ys7JB+W4yO6F$u9*R5;4TAI+il|e|Ni0p z|85ZXm;q+sNiiU618>lWEz#S$wK;ri6_jfzDCk#MybXbdd5XaopW;I(MnJEy0q7DI S7C{5TKLUmZu9$)U%D^9iYGOwK From 72bbd2229178b09a1e8b1b9daf99882574071e30 Mon Sep 17 00:00:00 2001 From: fdai7782 Date: Wed, 7 Feb 2024 17:26:09 +0000 Subject: [PATCH 081/125] Delete .DS_Store --- src/.DS_Store | Bin 6148 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 src/.DS_Store diff --git a/src/.DS_Store b/src/.DS_Store deleted file mode 100644 index 645429d0fb99900a963a659055ec409caba0fc5f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeHK!EVz)5S?ueaaw_Lpi(bLmbgYG2@r(1xFH-WE~u{B1EAEdqtwFoMzPZzqDVfM zkKw?DAK(}IJ7s2fn#M_s#08;tN7{Y6J2RWi8||(K07PdTHUVk?U}Gb+Hn6)vNKb7= z)_CPHqM$wYVtEq8GQc@)Xv8pJ82G;#ptEa10zO2LE}h?9)a_gybN(|J z#!;3x8W&=1-Fon_Vpr@<`-^ufCtmL7syLP%9gki@HR1yBsTBg4=^1zlfK)Zz97# z>W8O`dmp3gweOiXN@JN0aE<<_1v&H~gM29u-%(f21KZu1Ja9baJT#v!a#GGi@nN0^ z_ATdORbS4-N8I|F@1;DD?mh^g4SVxG1Z!e63>XIfiUGPG9BhOxW1&%99oVT70MWu_ zB{)`}{)i4OAi9i&MqEJ=+7(f|3NA4OR}MnEquyovLZfyEp?(?n;a?V9p$INKgrm$s zxEf7w7%&W!8CciT8omGT@eJQm|CgQ2%rIaWxKj)WtLt?;7!tp&E5XrQ>tH*^MnZOl mM&*JXKgVjI>SRW#}W#Bj1tIu}; From e45090a8aaa1e97f309b34bb34d4d846155e0f90 Mon Sep 17 00:00:00 2001 From: fdai7782 Date: Wed, 7 Feb 2024 17:26:23 +0000 Subject: [PATCH 082/125] Delete .DS_Store --- src/main/.DS_Store | Bin 6148 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 src/main/.DS_Store diff --git a/src/main/.DS_Store b/src/main/.DS_Store deleted file mode 100644 index b00d49e559631409db02fdc63fb065aa614f6ea8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeHK%}yIJ5Vk`gjv}NSK+4e)*QiYb1R*#qX?oz=MYIS|$Y!IkVzZ9&Lk>}-J(tJn zrBctlLSLqbcE%nmBH#)Unvurecs%1>e_q);LI~NIgjFGmLI?$ln8`!)jNmxx6UmS# z2Pkn46M%(N9nlEGvNPcJu5%olP7p8b--o|e>;k0d1k=%gB7O#gI2w&BmESV6l3iWP zshldPOaIzT{c(Fd88zC&bL^cM69*4=J2;KH(^hfglS#(yDCrJuLKJo( zlO!D3T;C0-yvnzVrP-`j-z)1{eRp2gv;A77tarBS^LbuvZhbuX(z=QJiTUoxmhdfF zStopeJ1}4+aj)ukOn>0qr9aNwH_axkPyIUkcG&xIk6$sw_f7c1$l&_%Odd`M@wfgk ziA~b8J@m0K1Iz$3uxt#_IjIWE_G0`#%m6d+<_zHZpg|Em!qlNXI-s#70ALo}R=~yr z0CO~T<5fJH80bQ!35<|Ll@N0_m2vdhHT}UcEBt2PDg(B_KVSa7Hh4dV9%M36B ziwvx|ZV~VQ&o9^ii%HyL2AF|&#emE<{bmD}M0e|x#o=A6L9akjFfMiYKLreX6+ Date: Wed, 7 Feb 2024 17:26:30 +0000 Subject: [PATCH 083/125] Delete .DS_Store --- src/main/c/.DS_Store | Bin 6148 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 src/main/c/.DS_Store diff --git a/src/main/c/.DS_Store b/src/main/c/.DS_Store deleted file mode 100644 index 3cd792b336a30119587b2a5f8579d18498207cfd..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeHK%SuBr5IxZ@3U0a)T;>Y|m#z$@E?oNoYOjR~eL&THe#mdsb7tb>*1J_iW?<$_ zW-`gmftv?_G=0851112*RAG`cAPNtr4q9hnvN3M(ggZQiMe)J;grPKUBZmtAE+6w?V=L1HnKr5DWwZ zKgs~lY{~e@F>Ejp3=SQ=JGW+=%^iC&u8 z6C-&!Znl^w{l`! N1dNa{!N4yt@CGn9FKz$; From 9addece41e1a51345b393ac8788f46293894252d Mon Sep 17 00:00:00 2001 From: fdai7782 Date: Wed, 7 Feb 2024 17:42:24 +0000 Subject: [PATCH 084/125] Delete .DS_Store --- src/test/.DS_Store | Bin 6148 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 src/test/.DS_Store diff --git a/src/test/.DS_Store b/src/test/.DS_Store deleted file mode 100644 index 7b1609b7387f89af4c5c8edf23c500d4ce970875..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeHK&1xGl5SDB=mN5k%8i;R#Tuo!UtwYFV<2r|2yQK*v#r1lPvvj>${1X?9VbAS5 zDk#>X-vONnMLR5qh3KTI{g60vyanuKr zBTo@f;v6Ob3#U4w5r$1?!0lcCBsTpZUfaKyw^r-|r056pNlFnvgEWpN(|Y|z=JJJS zTSZk=W%bd&G;@F2o6aWf-uN7Q?~RFrmE8+IM1y&^^5U&YroAW`jBP>`4j|;>G)h7< zZ<|>XPHe9422@Fvx|N;9qS@N7>1ONAvZfaY&3aA0e$`qoOKN*}@9rJ!=Fp`JNyUexCrheOq_ g#Nt)F18N2Q8Vx{?FmnhV5dIOcG;qTV{8a}209e{)P5=M^ From 5d6ac0642abde16dd4bff03aec8ca47f14107892 Mon Sep 17 00:00:00 2001 From: fdai7782 Date: Wed, 7 Feb 2024 17:42:30 +0000 Subject: [PATCH 085/125] Delete .DS_Store --- src/test/c/.DS_Store | Bin 6148 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 src/test/c/.DS_Store diff --git a/src/test/c/.DS_Store b/src/test/c/.DS_Store deleted file mode 100644 index 145327698ad90212822edf4297485a96bc49465d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeHKyG{c^44j1&k!aE&QSKK+;t!T66x4hGkRuXBlt>};*YVlO_yOW{AUX;(mh9Q} zd3JMCoMQlG@%DTT%m7U3hIqFyHhXS9va`$-BAsVE;D9H*qQlFm`ul`&FUeYybr|s1 z*kaGTowX(IF-Lc|*>$VUZbg>;y3P=GdAO)m=6!={M>%Fw;MWCV-kOETR zQvv%vRJvhH>;wJN!QdkRal*74*FH-St0jmnu@7X1R)R_lYRM6!1fBVsbuF2kMs{?t(P-+D<*m?=Ehp_)t9 Date: Wed, 7 Feb 2024 17:44:19 +0000 Subject: [PATCH 086/125] Updated the file name from test_taschenrechner.c to test_calculator.c --- ...est_taschenrechner.c => test_calculator.c} | 390 +++++++++--------- 1 file changed, 195 insertions(+), 195 deletions(-) rename src/test/c/{test_taschenrechner.c => test_calculator.c} (94%) diff --git a/src/test/c/test_taschenrechner.c b/src/test/c/test_calculator.c similarity index 94% rename from src/test/c/test_taschenrechner.c rename to src/test/c/test_calculator.c index 33f7f6c..ea6b518 100644 --- a/src/test/c/test_taschenrechner.c +++ b/src/test/c/test_calculator.c @@ -1,195 +1,195 @@ -#ifdef TEST - -#include "unity.h" - -#include "taschenrechner.h" - -void setUp(void) -{ -} - -void tearDown(void) -{ -} - -void test_addition(void) -{ - doulbe result = add(1, 2); - TEST_ASSERT_EQUAL(3, result); -} - -void test_minus(void) -{ - doulbe result = minus(3, 1); - TEST_ASSERT_EQUAL(2, result); -} - -void test_multiply(void) -{ - doulbe result = multiply(1, 2); - TEST_ASSERT_EQUAL(2, result); -} - -void test_divide(void) -{ - doulbe result = divide(4, 2); - TEST_ASSERT_EQUAL(2, result); - - doulbe result1 = divide(4, 0); - TEST_ASSERT_EQUAL(0, result1); -} - -void test_ConMeter(void) {//5 mm to cm - double result = ConMeter(5, 0, 1); - TEST_ASSERT_EQUAL(50, result); -} - -void test_ConMeterToFoot(void) {//5 m to foot - double result = ConMeterToFoot(5, 0, 1); - TEST_ASSERT_EQUAL(16.4042, result); -} -void test_ConKilometerToMiles(void) {//5 miles to km - double result = ConKilometerToMiles(5, 0, 1); - TEST_ASSERT_EQUAL(3.10686, result); -} - -void test_ConGram(void) {//5 mg to g - double result = ConGram(5, 0, 1); - TEST_ASSERT_EQUAL(5000, result); -} - -void test_ConGramToPounds(void) {//5 kg to pounds - double result = ConGramToPounds(5, 0, 1); - TEST_ASSERT_EQUAL(11.0231, result); -} - -void test_ConTemp(void) {//5 celsius to fahrenheit - double result = ConTemp(5, 0, 1); - TEST_ASSERT_EQUAL(41, result); -} - -void test_ConSpeed(void) {//5 kmh to mph - double result = ConTemp(5, 0, 1); - TEST_ASSERT_EQUAL(3.10686, result); -} - -void test_ConLiter(void) {//5 l to ml - double result = ConTemp(5, 1, 0); - TEST_ASSERT_EQUAL(5000, result); -} - -void test_ConLiterToGallon(void) {//5 l to gallon - double result = ConTemp(5, 0, 1); - TEST_ASSERT_EQUAL(1.32086, result); -} - -void test_ConData(void) {//5 b to kb - double result = ConData(5, 0, 1); - TEST_ASSERT_EQUAL(0.005, result); -} - -void test_ConArea(void) {//5 mm to cm - double result = ConData(5, 0, 1); - TEST_ASSERT_EQUAL(0.05), result); -} - -void test_ConVolume(void) {//5 mm to cm - double result = ConData(5, 0, 1); - TEST_ASSERT_EQUAL(0.005), result); -} - -void test_ConClock(void) {//5:00 to 5AM - double result = ConData(5, 0, 1); - TEST_ASSERT_EQUAL(5), result); -} - -void test_ConTime(void) {//5 ms to s - double result = ConData(5, 0, 1); - TEST_ASSERT_EQUAL(0.005), result); -} - - -// Square root function -void test_squareRootFunction(void) { - TEST_ASSERT_EQUAL_FLOAT(2.0, squareRootFunction(4.0)); -} - -// Sine function -void test_sineFunction(void) { - // Your test code here - TEST_ASSERT_EQUAL_FLOAT(0.0, sineFunction(0.0)); -} - -// Cosine function -void test_cosineFunction(void) { - // Your test code here - TEST_ASSERT_EQUAL_FLOAT(1.0, cosineFunction(0.0)); -} - -// Tangent function -void test_tangentFunction(void) { - // Your test code here - TEST_ASSERT_EQUAL_FLOAT(0.0, tangentFunction(0.0)); -} - -// Logarithm function -void test_logarithmFunction(void) { - // Your test code here - TEST_ASSERT_EQUAL_FLOAT(1.0, logarithmFunction(10.0)); -} - -// Natural logarithm function -void test_naturalLogarithmFunction(void) { - // Your test code here - TEST_ASSERT_EQUAL_FLOAT(0.0, naturalLogarithmFunction(1.0)); -} - -// Logarithm with base 2 function -void test_logarithmBase2Function(void) { - // Your test code here - TEST_ASSERT_EQUAL_FLOAT(3.0, logarithmBase2Function(8.0)); -} - -// Exponential function -void test_exponentialFunction(void) { - // Your test code here - TEST_ASSERT_EQUAL_FLOAT(1.0, exponentialFunction(0.0)); -} - -// Test case for subtraction -void test_performOperation_Subtraction(void) { - // Arrange - int result; - - // Act - result = performOperation(10, '-', 3); - - // Assert - TEST_ASSERT_EQUAL_INT(7, result); -} - -// Test case for multiplication -void test_performOperation_Multiplication(void) { - // Arrange - int result; - - // Act - result = performOperation(4, '*', 6); - - // Assert - TEST_ASSERT_EQUAL_INT(24, result); -} - -// Test case for division -void test_performOperation_Division(void) { - // Arrange - int result; - - // Act - result = performOperation(8, '/', 2); - - // Assert - TEST_ASSERT_EQUAL_INT(4, result); -} - -#endif // TEST +#ifdef TEST + +#include "unity.h" + +#include "calculator.h" + +void setUp(void) +{ +} + +void tearDown(void) +{ +} + +void test_addition(void) +{ + doulbe result = add(1, 2); + TEST_ASSERT_EQUAL(3, result); +} + +void test_minus(void) +{ + doulbe result = minus(3, 1); + TEST_ASSERT_EQUAL(2, result); +} + +void test_multiply(void) +{ + doulbe result = multiply(1, 2); + TEST_ASSERT_EQUAL(2, result); +} + +void test_divide(void) +{ + doulbe result = divide(4, 2); + TEST_ASSERT_EQUAL(2, result); + + doulbe result1 = divide(4, 0); + TEST_ASSERT_EQUAL(0, result1); +} + +void test_ConMeter(void) {//5 mm to cm + double result = ConMeter(5, 0, 1); + TEST_ASSERT_EQUAL(50, result); +} + +void test_ConMeterToFoot(void) {//5 m to foot + double result = ConMeterToFoot(5, 0, 1); + TEST_ASSERT_EQUAL(16.4042, result); +} +void test_ConKilometerToMiles(void) {//5 miles to km + double result = ConKilometerToMiles(5, 0, 1); + TEST_ASSERT_EQUAL(3.10686, result); +} + +void test_ConGram(void) {//5 mg to g + double result = ConGram(5, 0, 1); + TEST_ASSERT_EQUAL(5000, result); +} + +void test_ConGramToPounds(void) {//5 kg to pounds + double result = ConGramToPounds(5, 0, 1); + TEST_ASSERT_EQUAL(11.0231, result); +} + +void test_ConTemp(void) {//5 celsius to fahrenheit + double result = ConTemp(5, 0, 1); + TEST_ASSERT_EQUAL(41, result); +} + +void test_ConSpeed(void) {//5 kmh to mph + double result = ConTemp(5, 0, 1); + TEST_ASSERT_EQUAL(3.10686, result); +} + +void test_ConLiter(void) {//5 l to ml + double result = ConTemp(5, 1, 0); + TEST_ASSERT_EQUAL(5000, result); +} + +void test_ConLiterToGallon(void) {//5 l to gallon + double result = ConTemp(5, 0, 1); + TEST_ASSERT_EQUAL(1.32086, result); +} + +void test_ConData(void) {//5 b to kb + double result = ConData(5, 0, 1); + TEST_ASSERT_EQUAL(0.005, result); +} + +void test_ConArea(void) {//5 mm to cm + double result = ConData(5, 0, 1); + TEST_ASSERT_EQUAL(0.05), result); +} + +void test_ConVolume(void) {//5 mm to cm + double result = ConData(5, 0, 1); + TEST_ASSERT_EQUAL(0.005), result); +} + +void test_ConClock(void) {//5:00 to 5AM + double result = ConData(5, 0, 1); + TEST_ASSERT_EQUAL(5), result); +} + +void test_ConTime(void) {//5 ms to s + double result = ConData(5, 0, 1); + TEST_ASSERT_EQUAL(0.005), result); +} + + +// Square root function +void test_squareRootFunction(void) { + TEST_ASSERT_EQUAL_FLOAT(2.0, squareRootFunction(4.0)); +} + +// Sine function +void test_sineFunction(void) { + // Your test code here + TEST_ASSERT_EQUAL_FLOAT(0.0, sineFunction(0.0)); +} + +// Cosine function +void test_cosineFunction(void) { + // Your test code here + TEST_ASSERT_EQUAL_FLOAT(1.0, cosineFunction(0.0)); +} + +// Tangent function +void test_tangentFunction(void) { + // Your test code here + TEST_ASSERT_EQUAL_FLOAT(0.0, tangentFunction(0.0)); +} + +// Logarithm function +void test_logarithmFunction(void) { + // Your test code here + TEST_ASSERT_EQUAL_FLOAT(1.0, logarithmFunction(10.0)); +} + +// Natural logarithm function +void test_naturalLogarithmFunction(void) { + // Your test code here + TEST_ASSERT_EQUAL_FLOAT(0.0, naturalLogarithmFunction(1.0)); +} + +// Logarithm with base 2 function +void test_logarithmBase2Function(void) { + // Your test code here + TEST_ASSERT_EQUAL_FLOAT(3.0, logarithmBase2Function(8.0)); +} + +// Exponential function +void test_exponentialFunction(void) { + // Your test code here + TEST_ASSERT_EQUAL_FLOAT(1.0, exponentialFunction(0.0)); +} + +// Test case for subtraction +void test_performOperation_Subtraction(void) { + // Arrange + int result; + + // Act + result = performOperation(10, '-', 3); + + // Assert + TEST_ASSERT_EQUAL_INT(7, result); +} + +// Test case for multiplication +void test_performOperation_Multiplication(void) { + // Arrange + int result; + + // Act + result = performOperation(4, '*', 6); + + // Assert + TEST_ASSERT_EQUAL_INT(24, result); +} + +// Test case for division +void test_performOperation_Division(void) { + // Arrange + int result; + + // Act + result = performOperation(8, '/', 2); + + // Assert + TEST_ASSERT_EQUAL_INT(4, result); +} + +#endif // TEST From c004c09c8aed5fb8f5db66214d9e0fbf63022f0b Mon Sep 17 00:00:00 2001 From: fdai7782 Date: Wed, 7 Feb 2024 17:45:39 +0000 Subject: [PATCH 087/125] Updated file name from taschenrechner.h to calculator.h --- src/main/c/{taschenrechner.h => calculator.h} | 180 +++++++++--------- 1 file changed, 90 insertions(+), 90 deletions(-) rename src/main/c/{taschenrechner.h => calculator.h} (92%) diff --git a/src/main/c/taschenrechner.h b/src/main/c/calculator.h similarity index 92% rename from src/main/c/taschenrechner.h rename to src/main/c/calculator.h index aedb4f3..a559fa6 100644 --- a/src/main/c/taschenrechner.h +++ b/src/main/c/calculator.h @@ -1,90 +1,90 @@ -#ifndef TASCHENRECHNER_H -#define TASCHENRECHNER_H - -// add function -double add(double a, double b); - -// minus function -double minus(double a, double b); - -// multiply function -double multiply(double a, double b); - -// divide function -double divide(double a, double b); - -// get input and check if its a number -double testForNumber(); - -// get input and check if its a operator -char testForOperator(); - -// Square root function -double squareRootFunction(double x); - -//.. -// Trigonometric functions -double sineFunction(double angle); - -double cosineFunction(double angle); - -double tangentFunction(double angle); - -//.. -// Logarithmic functions -double logarithmFunction(double x); - -double naturalLogarithmFunction(double x); - -double logarithmBase2Function(double x); - -//.. -// Exponential function -double exponentialFunction(double x); - -// .. -// Bitwise AND function -int bitwiseAND(int num1, int num2); - -// Bitwise OR function -int bitwiseOR(int num1, int num2); - -// Bitwise XOR function -int bitwiseXOR(int num1, int num2); - -int mode(int userChoice); - -int displayMenu(); - -// Conversion Functions -double ConMeter(double meter, int startingUnit, int endingUnit); - -double ConMeterToFoot(double distance, int startingUnit, int endingUnit); - -double ConKilometerToMiles(double distance, int startingUnit, int endingUnit); - -double ConGram(double weight, int startingUnit, int endingUnit); - -double ConGramToPounds(double weight, int startingUnit, int endingUnit); - -double ConTemp(double temp, int startingUnit, int endingUnit); - -double ConSpeed(double speed, int startingUnit, int endingUnit); - -double ConLiter(double liter, int startingUnit, int endingUnit); - -double ConLiterToGallon(double fluid, int startingUnit, int endingUnit); - -double ConData(double data, int startingUnit, int endingUnit); - -double ConArea(double area, int startingUnit, int endingUnit); - -double ConVolume(double volum, int startingUnit, int endingUnit); - -double ConClock(double time, int startingUnit, int endingUnit); - -double ConTime(double time, int startingUnit, int endingUnit); - -int performOperation(int num1, char operator, int num2); - -#endif // TASCHENRECHNER_H +#ifndef CALCULATOR +#define CALCULATOR + +// add function +double add(double a, double b); + +// minus function +double minus(double a, double b); + +// multiply function +double multiply(double a, double b); + +// divide function +double divide(double a, double b); + +// get input and check if its a number +double testForNumber(); + +// get input and check if its a operator +char testForOperator(); + +// Square root function +double squareRootFunction(double x); + +//.. +// Trigonometric functions +double sineFunction(double angle); + +double cosineFunction(double angle); + +double tangentFunction(double angle); + +//.. +// Logarithmic functions +double logarithmFunction(double x); + +double naturalLogarithmFunction(double x); + +double logarithmBase2Function(double x); + +//.. +// Exponential function +double exponentialFunction(double x); + +// .. +// Bitwise AND function +int bitwiseAND(int num1, int num2); + +// Bitwise OR function +int bitwiseOR(int num1, int num2); + +// Bitwise XOR function +int bitwiseXOR(int num1, int num2); + +int mode(int userChoice); + +int displayMenu(); + +// Conversion Functions +double ConMeter(double meter, int startingUnit, int endingUnit); + +double ConMeterToFoot(double distance, int startingUnit, int endingUnit); + +double ConKilometerToMiles(double distance, int startingUnit, int endingUnit); + +double ConGram(double weight, int startingUnit, int endingUnit); + +double ConGramToPounds(double weight, int startingUnit, int endingUnit); + +double ConTemp(double temp, int startingUnit, int endingUnit); + +double ConSpeed(double speed, int startingUnit, int endingUnit); + +double ConLiter(double liter, int startingUnit, int endingUnit); + +double ConLiterToGallon(double fluid, int startingUnit, int endingUnit); + +double ConData(double data, int startingUnit, int endingUnit); + +double ConArea(double area, int startingUnit, int endingUnit); + +double ConVolume(double volum, int startingUnit, int endingUnit); + +double ConClock(double time, int startingUnit, int endingUnit); + +double ConTime(double time, int startingUnit, int endingUnit); + +int performOperation(int num1, char operator, int num2); + +#endif // CALCULATOR From 1ecc599c21fb3d9010224a38e61a36072b717a9d Mon Sep 17 00:00:00 2001 From: fdai7782 Date: Wed, 7 Feb 2024 17:46:32 +0000 Subject: [PATCH 088/125] Updated file name from main_taschenrechner.c to main_calculator.c --- src/main/c/{main_taschenrechner.c => main_calculator.c} | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename src/main/c/{main_taschenrechner.c => main_calculator.c} (99%) diff --git a/src/main/c/main_taschenrechner.c b/src/main/c/main_calculator.c similarity index 99% rename from src/main/c/main_taschenrechner.c rename to src/main/c/main_calculator.c index 414021b..76c9a10 100644 --- a/src/main/c/main_taschenrechner.c +++ b/src/main/c/main_calculator.c @@ -3,7 +3,7 @@ #include #include -#include "taschenrechner.h" +#include "calculator.h" double add(double a, double b) { @@ -1373,4 +1373,4 @@ int displayMenu(){ printf("\n0: Exit calculator\n"); return 1; // return 1 to check if the function works -} \ No newline at end of file +} From 3933c730dfe2257e10b787f1f20df4ab1c7038bb Mon Sep 17 00:00:00 2001 From: fdai7782 Date: Wed, 7 Feb 2024 17:47:49 +0000 Subject: [PATCH 089/125] Updated header file to calculator.h --- src/main/c/BasicMode.c | 118 ++++++++++++++++++++--------------------- 1 file changed, 59 insertions(+), 59 deletions(-) diff --git a/src/main/c/BasicMode.c b/src/main/c/BasicMode.c index f6101c3..d1e4d5c 100644 --- a/src/main/c/BasicMode.c +++ b/src/main/c/BasicMode.c @@ -1,59 +1,59 @@ -#include -#include -#include -#include - -#include "taschenrechner.h" - - -void BasicMode() { - char endtmp = '0'; //0 false, 1 true - double result = 0; - double numbers[100] = {0.0}; - char operators[100]; - - do { - //100 doubles in this array goes through the for loop till 100 numbers or = is entered - for (int i = 0; i < 100; i++) { - printf("Enter a Number: "); - numbers[i] = testForNumber(); //gets number - - printf("Enter a operation: "); - operators[i] = testForOperator(); //gets operator - } - } while (endtmp != '1'); - - - for (int i = 0; i < 100; i++) {//checks all operators to check for priority - if ((operators[i] == '/' || operators[i] == '*') && i > 1) { //if operators[i] == / or * and i>1 so you dont get numbers[-1] - if (operators[i] == '/') { - result += divide(numbers[i - 1], numbers[i]); //divides if char is / and adds number to the result - } - // for all calculations we take the number and the number before that - else { // and do the operation - result += multiply(numbers[i - 1], numbers[i]); //multiplys if char is * and adds number to the result - } - } - - else if ((operators[i] == '+' || operators[i] == '-') && i > 1) { - if (operators[i] == '+') { - result += add(numbers[i - 1], numbers[i]); //adds if char is + and adds number to the result - } - - else { - result += minus(numbers[i - 1], numbers[i]); //subtrakts if char is - and adds number to the result - } - } - - else if (i<=1 && operators[i] == '=') { //if there are less then 2 numbers in the array - result = numbers[i]; //set result to the 0 digit - } - - else if (operators[i] == '=') { //if char is = - printf("The result is: %f", result); //print out the result - i = 100; - break; - } - i++; - } -} +#include +#include +#include +#include + +#include "calculator.h" + + +void BasicMode() { + char endtmp = '0'; //0 false, 1 true + double result = 0; + double numbers[100] = {0.0}; + char operators[100]; + + do { + //100 doubles in this array goes through the for loop till 100 numbers or = is entered + for (int i = 0; i < 100; i++) { + printf("Enter a Number: "); + numbers[i] = testForNumber(); //gets number + + printf("Enter a operation: "); + operators[i] = testForOperator(); //gets operator + } + } while (endtmp != '1'); + + + for (int i = 0; i < 100; i++) {//checks all operators to check for priority + if ((operators[i] == '/' || operators[i] == '*') && i > 1) { //if operators[i] == / or * and i>1 so you dont get numbers[-1] + if (operators[i] == '/') { + result += divide(numbers[i - 1], numbers[i]); //divides if char is / and adds number to the result + } + // for all calculations we take the number and the number before that + else { // and do the operation + result += multiply(numbers[i - 1], numbers[i]); //multiplys if char is * and adds number to the result + } + } + + else if ((operators[i] == '+' || operators[i] == '-') && i > 1) { + if (operators[i] == '+') { + result += add(numbers[i - 1], numbers[i]); //adds if char is + and adds number to the result + } + + else { + result += minus(numbers[i - 1], numbers[i]); //subtrakts if char is - and adds number to the result + } + } + + else if (i<=1 && operators[i] == '=') { //if there are less then 2 numbers in the array + result = numbers[i]; //set result to the 0 digit + } + + else if (operators[i] == '=') { //if char is = + printf("The result is: %f", result); //print out the result + i = 100; + break; + } + i++; + } +} From 6a19375953340739bc9004b912b521e9a4cb5a3a Mon Sep 17 00:00:00 2001 From: fdai7782 Date: Wed, 7 Feb 2024 17:48:17 +0000 Subject: [PATCH 090/125] Updated header file to calculator.h --- src/main/c/ConvertMode.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/c/ConvertMode.c b/src/main/c/ConvertMode.c index 5ce125c..6e985cf 100644 --- a/src/main/c/ConvertMode.c +++ b/src/main/c/ConvertMode.c @@ -4,7 +4,7 @@ #include #include -#include "taschenrechner.h" +#include "calculator.h" // Unit converter mode int choice, startingUnit, endingUnit; @@ -174,7 +174,7 @@ double getValue(int choice) { result = ConArea(value, startingUnit, endingUnit); - printf("\nThe convertet result is %dlf %d²", result, Distance[endingUnit]); + printf("\nThe convertet result is %dlf %d", result, Distance[endingUnit]); break; case 12://char Distance[] = { 'mm', 'cm', 'm', 'km', 'feet/inch', 'miles'}; @@ -186,7 +186,7 @@ double getValue(int choice) { result = ConArea(value, startingUnit, endingUnit); - printf("\nThe convertet result is %dlf %d³", result, Distance[endingUnit]); + printf("\nThe convertet result is %dlf %d", result, Distance[endingUnit]); break; case 13://char Time[] = { 'ms', 's', 'min', 'h', 'd', 'w', 'mon', 'y' }; @@ -243,8 +243,8 @@ void unitConverterMode() { printf("10. Convert Data size (MB, GB, TB)\n"); printf("Area/Volume conversions \n"); - printf("11. Convert area (cm², m², km²) \n"); - printf("12. Convert Volume (cm³, m³, km³)\n"); + printf("11. Convert area (cm, m, km) \n"); + printf("12. Convert Volume (cm, m, km)\n"); printf("Time conversion \n"); printf("13. Convert time (s, m, h, d, w, m, y) \n"); @@ -256,4 +256,4 @@ void unitConverterMode() { printf("\nEnter your choice (Exit with 0): "); scanf("%d", &choice); getValue(choice); -} \ No newline at end of file +} From 873207a6dd678a2f7180e491492d7160c7219fcc Mon Sep 17 00:00:00 2001 From: fdai7782 Date: Wed, 7 Feb 2024 17:48:38 +0000 Subject: [PATCH 091/125] Updated header file to calculator.h --- src/main/c/programmingMode.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/c/programmingMode.c b/src/main/c/programmingMode.c index e4c2b8d..40da798 100644 --- a/src/main/c/programmingMode.c +++ b/src/main/c/programmingMode.c @@ -3,7 +3,7 @@ #include #include -#include "taschenrechner.h" +#include "calculator.h" // get the NUmbers from the user int getIntegerInput(const char* prompt) { @@ -52,4 +52,4 @@ void programmingMode() { // Calculation + Display the result printf("Result: %d\n", performOperation(num1, operator, num2)); -} \ No newline at end of file +} From c2370ea9e830ffd05766e1ce6c26629ec527d1c8 Mon Sep 17 00:00:00 2001 From: fdai7782 Date: Wed, 7 Feb 2024 17:49:01 +0000 Subject: [PATCH 092/125] Updated header file to calculator.h --- src/main/c/scientificMode.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/c/scientificMode.c b/src/main/c/scientificMode.c index 31cd161..8aa73e3 100644 --- a/src/main/c/scientificMode.c +++ b/src/main/c/scientificMode.c @@ -2,7 +2,7 @@ #include #include -#include "taschenrechner.h" +#include "calculator.h" // get the number which has to be calculated double getNumberFromUser() { @@ -154,4 +154,4 @@ double scientificMode() { } while (choice != 0); return result; -} \ No newline at end of file +} From 253f476168e54e1fcfec7d2553f460ef8b0df702 Mon Sep 17 00:00:00 2001 From: fdai7782 Date: Wed, 7 Feb 2024 17:49:30 +0000 Subject: [PATCH 093/125] Updated header file to calculator.h --- src/main/c/testForNumber.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/c/testForNumber.c b/src/main/c/testForNumber.c index 06438d1..06654b6 100644 --- a/src/main/c/testForNumber.c +++ b/src/main/c/testForNumber.c @@ -3,7 +3,7 @@ #include #include -#include "taschenrechner.h" +#include "calculator.h" double testForNumber() { double num; @@ -27,4 +27,4 @@ double testForNumber() { } while (!isspace(*notANumber) && *notANumber != 0); return num; -} \ No newline at end of file +} From 2968e1664a24484734bdeb973d36ce64780d45e5 Mon Sep 17 00:00:00 2001 From: fdai7782 Date: Wed, 7 Feb 2024 17:49:48 +0000 Subject: [PATCH 094/125] Updated header file to calculator.h --- src/main/c/testForOperator.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/c/testForOperator.c b/src/main/c/testForOperator.c index 0ad34c6..d3a7c1f 100644 --- a/src/main/c/testForOperator.c +++ b/src/main/c/testForOperator.c @@ -4,7 +4,7 @@ #include #include -#include "taschenrechner.h" +#include "calculator.h" char testForOperator() { //saving the number of operators in a variable so it only needs to be changed in one location @@ -26,4 +26,4 @@ char testForOperator() { //if the input was deemed invalid it asks for new input and goes to the top of the while loop printf("The input was not allowed. Please try again!\n"); } -} \ No newline at end of file +} From d72de5a282b506549c3751bcf00dc4e650f6a50a Mon Sep 17 00:00:00 2001 From: fdai7782 Date: Wed, 7 Feb 2024 18:04:50 +0000 Subject: [PATCH 095/125] Update README.md --- README.md | 49 ++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 48 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index c893835..7c9daf0 100644 --- a/README.md +++ b/README.md @@ -1 +1,48 @@ -# Projekt Taschenrechner +# Calculator + +## Description + +This versatile calculator program, written in C, offers various modes catering to different mathematical needs, including basic arithmetic, scientific calculations, unit conversions, functions, geometric calculations, and binary operations. + +## Features + +### Basic Calculator +- User-friendly interface +- Support for integer arithmetic +- Error handling for division by zero +- Programming mode for interactive calculations + +### Scientific Calculator +- Advanced scientific functions +- Trigonometric and logarithmic operations +- Mathematical constants support + +### Unit Converter +- Conversion between different units +- Length, weight, volume, and more + +### Function Calculator +- Evaluate mathematical functions +- Input and output functions as variables + +### Geometric Calculator +- Solve geometric problems +- Area, perimeter, and other geometric calculations + +### Binary Calculator +- Perform binary arithmetic +- Convert between binary and decimal + +## Getting Started + +### Prerequisites + +- C compiler (e.g., GCC) + +### Installation + +1. Clone the repository: + + ```bash + git clone https://gitlab.cs.hs-fulda.de/fdai7766/caschenrechner.git + From 1c4c48654e693fc3eb0f79c127c3ee21304dd13c Mon Sep 17 00:00:00 2001 From: fdai7782 Date: Wed, 7 Feb 2024 19:09:22 +0000 Subject: [PATCH 096/125] Changed the parameter name from operation to operationType in the function performOperation in the programmingMode.c file and also in the calculator.h file --- src/main/c/calculator.h | 2 +- src/main/c/programmingMode.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/c/calculator.h b/src/main/c/calculator.h index a559fa6..0a34ca1 100644 --- a/src/main/c/calculator.h +++ b/src/main/c/calculator.h @@ -85,6 +85,6 @@ double ConClock(double time, int startingUnit, int endingUnit); double ConTime(double time, int startingUnit, int endingUnit); -int performOperation(int num1, char operator, int num2); +int performOperation(int num1, char operatorType, int num2); #endif // CALCULATOR diff --git a/src/main/c/programmingMode.c b/src/main/c/programmingMode.c index 40da798..f9a4ebb 100644 --- a/src/main/c/programmingMode.c +++ b/src/main/c/programmingMode.c @@ -22,8 +22,8 @@ char getOperatorInput() { } // Calculation -int performOperation(int num1, char operator, int num2) { - switch (operator) { +int performOperation(int num1, char operatorType, int num2) { + switch (operatorType) { case '+': return num1 + num2; case '-': From 8718b9d50788ef87165e9f792e098a6ff46fb1a9 Mon Sep 17 00:00:00 2001 From: fdai7782 Date: Wed, 7 Feb 2024 20:54:53 +0000 Subject: [PATCH 097/125] Improve programmingMode to display results in binary (hexadecimal format) and prompt user for continuation --- src/main/c/programmingMode.c | 55 ++++++++++++++++++++++++++++++++---- 1 file changed, 50 insertions(+), 5 deletions(-) diff --git a/src/main/c/programmingMode.c b/src/main/c/programmingMode.c index f9a4ebb..48bc867 100644 --- a/src/main/c/programmingMode.c +++ b/src/main/c/programmingMode.c @@ -5,6 +5,10 @@ #include "calculator.h" + +// Function to convert an integer to binary representation +char* binaryRepresentation(int num); + // get the NUmbers from the user int getIntegerInput(const char* prompt) { int num; @@ -45,11 +49,52 @@ int performOperation(int num1, char operatorType, int num2) { void programmingMode() { - int num1 = getIntegerInput("Enter first integer: "); - char operator = getOperatorInput(); - int num2 = getIntegerInput("Enter second integer: "); +char choice; + do { + int num1 = getIntegerInput("Enter first integer: "); + char operator = getOperatorInput(); + int num2 = getIntegerInput("Enter second integer: "); + + // Calculation + int result = performOperation(num1, operator, num2); - // Calculation + Display the result + // Display the result in different bases based on user choice + int base; + printf("Choose base to print the result (2 for binary, 8 for octal, 16 for hexadecimal): "); + scanf("%d", &base); - printf("Result: %d\n", performOperation(num1, operator, num2)); + switch (base) { + case 2: + printf("Result (Binary): %s\n", binaryRepresentation(result)); + break; + case 8: + printf("Result (Octal): %o\n", result); + break; + case 16: + printf("Result (Hexadecimal): %x\n", result); + break; + default: + printf("Invalid base choice\n"); + break; + } + + // Ask user if they want to continue + printf("Do you want to continue? (y/n): "); + scanf(" %c", &choice); + + } while (choice == 'y' || choice == 'Y'); } + + + +// Function to convert an integer to binary representation +char* binaryRepresentation(int num) { + static char binary[32]; + for (int i = 31; i >= 0; i--) { + binary[i] = (num & 1) + '0'; + num >>= 1; + } + binary[32] = '\0'; + return binary; +} + From d1a8cc1a307221778736a7007caff29c4d7ab614 Mon Sep 17 00:00:00 2001 From: fdai7782 Date: Thu, 8 Feb 2024 20:50:59 +0000 Subject: [PATCH 098/125] Fix syntax error in main_calculator.c and test_calculator.c --- src/main/c/main_calculator.c | 16 ++++++++-------- src/test/c/test_calculator.c | 10 +++++----- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/main/c/main_calculator.c b/src/main/c/main_calculator.c index 76c9a10..8bfa480 100644 --- a/src/main/c/main_calculator.c +++ b/src/main/c/main_calculator.c @@ -300,7 +300,7 @@ double ConMeterToFoot(double distance, int startingUnit, int endingUnit) { break; case 1: //feet/inch to meter - return distance / 3. 28084; + return distance / 3.28084; break; default: @@ -311,7 +311,7 @@ double ConMeterToFoot(double distance, int startingUnit, int endingUnit) { switch (endingUnit) { case 0: //meter to feet/inch - return distance * 3. 28084; + return distance * 3.28084; break; case 1: //feet/inch to feet/inch @@ -338,7 +338,7 @@ double ConKilometerToMiles(double distance, int startingUnit, int endingUnit) { break; case 1: //miles to kilometer - return distance * 1. 60934; + return distance * 1.60934; break; default: @@ -349,7 +349,7 @@ double ConKilometerToMiles(double distance, int startingUnit, int endingUnit) { switch (endingUnit) { case 0: //kilometer to miles - return distance / 1. 60934; + return distance / 1.60934; break; case 1: //kilometer to kilometer @@ -804,7 +804,7 @@ double ConData(double data, int startingUnit, int endingUnit) { break; case 4: //1 - return; + return data; break; case 5: //0.001 @@ -964,7 +964,7 @@ double ConClock(double time, int startingUnit, int endingUnit) { } else { - return time + return time; } break; @@ -1105,7 +1105,7 @@ double ConTime(double time, int startingUnit, int endingUnit) { break; case 7: //y - return time / 60 * 24 * 7 * 4 * 12); + return time / (60 * 24 * 7 * 4 * 12); break; default: @@ -1296,7 +1296,7 @@ double ConTime(double time, int startingUnit, int endingUnit) { break; case 6: //mon - return time * 12); + return time * 12; break; case 7: //y diff --git a/src/test/c/test_calculator.c b/src/test/c/test_calculator.c index ea6b518..b3f261c 100644 --- a/src/test/c/test_calculator.c +++ b/src/test/c/test_calculator.c @@ -14,28 +14,28 @@ void tearDown(void) void test_addition(void) { - doulbe result = add(1, 2); + double result = add(1, 2); TEST_ASSERT_EQUAL(3, result); } void test_minus(void) { - doulbe result = minus(3, 1); + double result = minus(3, 1); TEST_ASSERT_EQUAL(2, result); } void test_multiply(void) { - doulbe result = multiply(1, 2); + double result = multiply(1, 2); TEST_ASSERT_EQUAL(2, result); } void test_divide(void) { - doulbe result = divide(4, 2); + double result = divide(4, 2); TEST_ASSERT_EQUAL(2, result); - doulbe result1 = divide(4, 0); + double result1 = divide(4, 0); TEST_ASSERT_EQUAL(0, result1); } From 8e780d521ffd131577930028b72b2fa5160b2100 Mon Sep 17 00:00:00 2001 From: fdai7782 Date: Fri, 9 Feb 2024 09:13:49 +0000 Subject: [PATCH 099/125] Added the /support folder under the test/c/ --- src/test/c/support/.gitkeep | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 src/test/c/support/.gitkeep diff --git a/src/test/c/support/.gitkeep b/src/test/c/support/.gitkeep new file mode 100644 index 0000000..e69de29 From 7e96f4ed54a69c40b218e7794846af76432f9eab Mon Sep 17 00:00:00 2001 From: fdai7782 Date: Fri, 9 Feb 2024 18:40:49 +0100 Subject: [PATCH 100/125] IMPORTANT FIXES: ADDED ALL HEADER FILES FOR THE DIFFRENT .C FILES AND ALSO IMPROVED THE YAML FILE -- COMPILING WORKS NOW! --- .vscode/c_cpp_properties.json | 16 + .vscode/settings.json | 8 + Unity | 1 + build-project.sh | 0 project.yml | 16 +- src/main/c/BasicMode.c | 2 +- src/main/c/ConvertMode.c | 1 - src/main/c/main_calculator.c | 51 +- .../c/{calculator.h => main_calculator.h} | 13 +- src/main/c/programmingMode.c | 2 +- src/main/c/programmingMode.h | 8 + src/main/c/scientificMode.c | 1 - src/main/c/testForNumber.c | 3 +- src/main/c/testForNumber.h | 7 + src/main/c/testForOperator.c | 4 +- src/main/c/testForOperator.h | 7 + src/test/c/test_calculator.c | 35 +- target/test/cache/defines_dependency.yml | 9 + target/test/cache/input.yml | 243 +++++++++ target/test/cache/test_calculator.c | 502 ++++++++++++++++++ target/test/dependencies/cmock.d | 6 + target/test/dependencies/force_build | 0 target/test/dependencies/main_calculator.d | 2 + target/test/dependencies/programmingMode.d | 2 + target/test/dependencies/testForNumber.d | 2 + target/test/dependencies/testForOperator.d | 2 + target/test/dependencies/test_calculator.d | 5 + .../dependencies/test_calculator_runner.d | 4 + target/test/dependencies/unity.d | 4 + target/test/out/c/cmock.o | Bin 0 -> 11200 bytes target/test/out/c/main_calculator.o | Bin 0 -> 32304 bytes target/test/out/c/programmingMode.o | Bin 0 -> 8080 bytes target/test/out/c/testForNumber.o | Bin 0 -> 7768 bytes target/test/out/c/testForOperator.o | Bin 0 -> 4776 bytes target/test/out/c/test_calculator.o | Bin 0 -> 19888 bytes target/test/out/c/test_calculator_runner.o | Bin 0 -> 14488 bytes target/test/out/c/unity.o | Bin 0 -> 57112 bytes target/test/out/test_calculator.out | Bin 0 -> 90008 bytes .../test/preprocess/files/test_calculator.c | 502 ++++++++++++++++++ .../preprocess/includes/test_calculator.c | 6 + target/test/results/test_calculator.pass | 130 +++++ target/test/runners/test_calculator_runner.c | 137 +++++ 42 files changed, 1652 insertions(+), 79 deletions(-) create mode 100644 .vscode/c_cpp_properties.json create mode 100644 .vscode/settings.json create mode 160000 Unity mode change 100644 => 100755 build-project.sh rename src/main/c/{calculator.h => main_calculator.h} (88%) create mode 100644 src/main/c/programmingMode.h create mode 100644 src/main/c/testForNumber.h create mode 100644 src/main/c/testForOperator.h create mode 100644 target/test/cache/defines_dependency.yml create mode 100644 target/test/cache/input.yml create mode 100644 target/test/cache/test_calculator.c create mode 100644 target/test/dependencies/cmock.d create mode 100644 target/test/dependencies/force_build create mode 100644 target/test/dependencies/main_calculator.d create mode 100644 target/test/dependencies/programmingMode.d create mode 100644 target/test/dependencies/testForNumber.d create mode 100644 target/test/dependencies/testForOperator.d create mode 100644 target/test/dependencies/test_calculator.d create mode 100644 target/test/dependencies/test_calculator_runner.d create mode 100644 target/test/dependencies/unity.d create mode 100644 target/test/out/c/cmock.o create mode 100644 target/test/out/c/main_calculator.o create mode 100644 target/test/out/c/programmingMode.o create mode 100644 target/test/out/c/testForNumber.o create mode 100644 target/test/out/c/testForOperator.o create mode 100644 target/test/out/c/test_calculator.o create mode 100644 target/test/out/c/test_calculator_runner.o create mode 100644 target/test/out/c/unity.o create mode 100755 target/test/out/test_calculator.out create mode 100644 target/test/preprocess/files/test_calculator.c create mode 100644 target/test/preprocess/includes/test_calculator.c create mode 100644 target/test/results/test_calculator.pass create mode 100644 target/test/runners/test_calculator_runner.c diff --git a/.vscode/c_cpp_properties.json b/.vscode/c_cpp_properties.json new file mode 100644 index 0000000..c11401d --- /dev/null +++ b/.vscode/c_cpp_properties.json @@ -0,0 +1,16 @@ +{ + "configurations": [ + { + "name": "Linux", + "includePath": [ + "${workspaceFolder}/**" + ], + "defines": [], + "compilerPath": "/usr/bin/gcc", + "cStandard": "c17", + "cppStandard": "c++98", + "intelliSenseMode": "linux-gcc-x64" + } + ], + "version": 4 +} \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..355d4a1 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,8 @@ +{ + "C_Cpp.errorSquiggles": "disabled", + "files.associations": { + "testforoperator.h": "c", + "testfornumber.h": "c", + "programmingmode.h": "c" + } +} \ No newline at end of file diff --git a/Unity b/Unity new file mode 160000 index 0000000..134496c --- /dev/null +++ b/Unity @@ -0,0 +1 @@ +Subproject commit 134496c6c0c34b463d58daef1904a12abdc5c8e0 diff --git a/build-project.sh b/build-project.sh old mode 100644 new mode 100755 diff --git a/project.yml b/project.yml index 4801bd7..923b2e8 100644 --- a/project.yml +++ b/project.yml @@ -91,15 +91,15 @@ :system: - m # Example: add 'm' to use the math library :test: - - stdio - - string - - stdlib - - m # Example: add 'm' to use the math library in tests + #- stdio + #- string + #- stdlib + #- m # Example: add 'm' to use the math library in tests :release: - - stdio - - string - - stdlib - - m # Example: add 'm' to use the math library in release builds + #- stdio + #- string + #- stdlib + #- m # Example: add 'm' to use the math library in release builds :plugins: :load_paths: diff --git a/src/main/c/BasicMode.c b/src/main/c/BasicMode.c index d1e4d5c..a8dcc27 100644 --- a/src/main/c/BasicMode.c +++ b/src/main/c/BasicMode.c @@ -3,7 +3,7 @@ #include #include -#include "calculator.h" + void BasicMode() { diff --git a/src/main/c/ConvertMode.c b/src/main/c/ConvertMode.c index 6e985cf..23d808d 100644 --- a/src/main/c/ConvertMode.c +++ b/src/main/c/ConvertMode.c @@ -4,7 +4,6 @@ #include #include -#include "calculator.h" // Unit converter mode int choice, startingUnit, endingUnit; diff --git a/src/main/c/main_calculator.c b/src/main/c/main_calculator.c index 8bfa480..9ba9aa5 100644 --- a/src/main/c/main_calculator.c +++ b/src/main/c/main_calculator.c @@ -3,7 +3,7 @@ #include #include -#include "calculator.h" +#include "main_calculator.h" double add(double a, double b) { @@ -487,7 +487,7 @@ double ConGramToPounds(double weight, int startingUnit, int endingUnit) { switch (endingUnit) { case 0: //pounds to kg - return weight *= 0, 453592; + return weight *= 453.592; break; case 1: //pounds to pounds @@ -510,11 +510,11 @@ double ConTemp(double temp, int startingUnit, int endingUnit) { switch (endingUnit) { case 0: //celsius to fahrenheit - return temp = (temp - 32) * 0, 55555555; + return temp = (temp - 32) * 0,55555555; break; case 1: //celsius to celsius - return temp; + return (temp * 9 / 5) + 32; break; default: @@ -552,7 +552,7 @@ double ConSpeed(double speed, int startingUnit, int endingUnit) { break; case 1: //kmh to mph - return speed * 0.621371; + return speed / 1.60934; break; default: @@ -590,7 +590,7 @@ double ConLiter(double liter, int startingUnit, int endingUnit) { break; case 1: //ml to l - return liter / 1000; + return ( liter / 1000 ); break; default: @@ -628,7 +628,7 @@ double ConLiterToGallon(double fluid, int startingUnit, int endingUnit) { break; case 1: //l to gallon - return fluid * 0.264172; + return fluid / 3.785; break; default: @@ -960,7 +960,7 @@ double ConClock(double time, int startingUnit, int endingUnit) { case 1: //24 to 12 if (time > 12) { - return time -12; + return time - 12; } else { @@ -1003,31 +1003,31 @@ double ConTime(double time, int startingUnit, int endingUnit) { break; case 1: //s - return time / 1000; + return (double) time / 1000; break; case 2: //min - return time / (1000 * 60); + return (double) time / (1000 * 60); break; case 3: //h - return time / (1000 * 60 * 60); + return (double) time / (1000 * 60 * 60); break; case 4: //d - return time / (1000 * 60 * 60 * 24); + return (double) time / (1000 * 60 * 60 * 24); break; case 5: //w - return time / (1000 * 60 * 60 * 24 * 7); + return (double) time / (1000 * 60 * 60 * 24 * 7); break; case 6: //mon - return time / (1000 * 60 * 60 * 24 * 7 * 30); + return time / (1000.0 * 60.0 * 60.0 * 24.0 * 7.0 * 30.0); break; case 7: //y - return time / (1000 * 60 * 60 * 24 * 7 * 30 * 12); + return time / (1000.0 * 60.0 * 60.0 * 24.0 * 7.0 * 30.0 * 12.0); break; default: @@ -1310,27 +1310,6 @@ double ConTime(double time, int startingUnit, int endingUnit) { } -//.. -// graphMode -void graphMode() { - double x, y; - - printf("Enter the range for x (start end step): "); - double x_start, x_end, x_step; - scanf("%lf %lf %lf", &x_start, &x_end, &x_step); - - printf("\nGraph for the function y = sin(x):\n"); - - printf(" x\t| y\n"); - printf("--------------\n"); - - for (x = x_start; x <= x_end; x += x_step) { - y = sin(x); - printf("%.2lf\t| %.2lf\n", x, y); - } -} - - // change mode int mode(int userChoice){ diff --git a/src/main/c/calculator.h b/src/main/c/main_calculator.h similarity index 88% rename from src/main/c/calculator.h rename to src/main/c/main_calculator.h index 0a34ca1..45cb01e 100644 --- a/src/main/c/calculator.h +++ b/src/main/c/main_calculator.h @@ -1,5 +1,5 @@ -#ifndef CALCULATOR -#define CALCULATOR +#ifndef MAIN_CALCULATOR +#define MAIN_CALCULATOR // add function double add(double a, double b); @@ -13,12 +13,6 @@ double multiply(double a, double b); // divide function double divide(double a, double b); -// get input and check if its a number -double testForNumber(); - -// get input and check if its a operator -char testForOperator(); - // Square root function double squareRootFunction(double x); @@ -85,6 +79,5 @@ double ConClock(double time, int startingUnit, int endingUnit); double ConTime(double time, int startingUnit, int endingUnit); -int performOperation(int num1, char operatorType, int num2); -#endif // CALCULATOR +#endif // CALCULATOR \ No newline at end of file diff --git a/src/main/c/programmingMode.c b/src/main/c/programmingMode.c index 48bc867..b96b77c 100644 --- a/src/main/c/programmingMode.c +++ b/src/main/c/programmingMode.c @@ -3,7 +3,7 @@ #include #include -#include "calculator.h" +#include "programmingMode.h" // Function to convert an integer to binary representation diff --git a/src/main/c/programmingMode.h b/src/main/c/programmingMode.h new file mode 100644 index 0000000..4e800e4 --- /dev/null +++ b/src/main/c/programmingMode.h @@ -0,0 +1,8 @@ +#ifndef PROGRAMMINGMODE +#define PROGRAMMINGMODE + +// to test some calculations +int performOperation(int num1, char operatorType, int num2); + + +#endif // PROGRAMMINGMODE \ No newline at end of file diff --git a/src/main/c/scientificMode.c b/src/main/c/scientificMode.c index 8aa73e3..2dd40d8 100644 --- a/src/main/c/scientificMode.c +++ b/src/main/c/scientificMode.c @@ -2,7 +2,6 @@ #include #include -#include "calculator.h" // get the number which has to be calculated double getNumberFromUser() { diff --git a/src/main/c/testForNumber.c b/src/main/c/testForNumber.c index 06654b6..511de91 100644 --- a/src/main/c/testForNumber.c +++ b/src/main/c/testForNumber.c @@ -2,8 +2,9 @@ #include #include #include +#include -#include "calculator.h" +#include "testForNumber.h" double testForNumber() { double num; diff --git a/src/main/c/testForNumber.h b/src/main/c/testForNumber.h new file mode 100644 index 0000000..e1d9a91 --- /dev/null +++ b/src/main/c/testForNumber.h @@ -0,0 +1,7 @@ +#ifndef TESTFORNUMBER +#define TESTFORNUMBER + +// get input and check if its a number +double testForNumber(); + +#endif // TESTFORNUMBER \ No newline at end of file diff --git a/src/main/c/testForOperator.c b/src/main/c/testForOperator.c index d3a7c1f..4c243e0 100644 --- a/src/main/c/testForOperator.c +++ b/src/main/c/testForOperator.c @@ -4,7 +4,7 @@ #include #include -#include "calculator.h" +#include "testForOperator.h" char testForOperator() { //saving the number of operators in a variable so it only needs to be changed in one location @@ -16,7 +16,7 @@ char testForOperator() { //Loops as long as input isn't valid, enters at least one time while (!validInput) { - scanf_s("%c\n", &input); + scanf("%c\n", &input); //checks every position of the array if a position is equal to input returns the input, which also stopps the function for (int i = 0; i <= numberOfOperators; i++) { if (input == oppArray[i]) { diff --git a/src/main/c/testForOperator.h b/src/main/c/testForOperator.h new file mode 100644 index 0000000..34a8467 --- /dev/null +++ b/src/main/c/testForOperator.h @@ -0,0 +1,7 @@ +#ifndef TESTFOROPERATOR +#define TESTFOROPERATOR + +// get input and check if its a operator +char testForOperator(); + +#endif // TESTFOROPERATOR \ No newline at end of file diff --git a/src/test/c/test_calculator.c b/src/test/c/test_calculator.c index b3f261c..dde64f2 100644 --- a/src/test/c/test_calculator.c +++ b/src/test/c/test_calculator.c @@ -1,8 +1,9 @@ -#ifdef TEST - #include "unity.h" -#include "calculator.h" +#include "main_calculator.h" +#include "testForOperator.h" +#include "testForNumber.h" +#include "programmingMode.h" void setUp(void) { @@ -41,25 +42,25 @@ void test_divide(void) void test_ConMeter(void) {//5 mm to cm double result = ConMeter(5, 0, 1); - TEST_ASSERT_EQUAL(50, result); + TEST_ASSERT_EQUAL(0.5, result); } void test_ConMeterToFoot(void) {//5 m to foot - double result = ConMeterToFoot(5, 0, 1); + double result = ConMeterToFoot(5, 1, 0); TEST_ASSERT_EQUAL(16.4042, result); } void test_ConKilometerToMiles(void) {//5 miles to km double result = ConKilometerToMiles(5, 0, 1); - TEST_ASSERT_EQUAL(3.10686, result); + TEST_ASSERT_EQUAL(8.04672, result); } void test_ConGram(void) {//5 mg to g double result = ConGram(5, 0, 1); - TEST_ASSERT_EQUAL(5000, result); + TEST_ASSERT_EQUAL(0.005, result); } void test_ConGramToPounds(void) {//5 kg to pounds - double result = ConGramToPounds(5, 0, 1); + double result = ConGramToPounds(5, 0, 0); TEST_ASSERT_EQUAL(11.0231, result); } @@ -69,17 +70,17 @@ void test_ConTemp(void) {//5 celsius to fahrenheit } void test_ConSpeed(void) {//5 kmh to mph - double result = ConTemp(5, 0, 1); + double result = ConSpeed(5, 0, 1); TEST_ASSERT_EQUAL(3.10686, result); } void test_ConLiter(void) {//5 l to ml - double result = ConTemp(5, 1, 0); + double result = ConLiter(5, 1, 0); TEST_ASSERT_EQUAL(5000, result); } void test_ConLiterToGallon(void) {//5 l to gallon - double result = ConTemp(5, 0, 1); + double result = ConLiterToGallon(5, 0, 1); TEST_ASSERT_EQUAL(1.32086, result); } @@ -90,22 +91,22 @@ void test_ConData(void) {//5 b to kb void test_ConArea(void) {//5 mm to cm double result = ConData(5, 0, 1); - TEST_ASSERT_EQUAL(0.05), result); + TEST_ASSERT_EQUAL(0.05, result); } void test_ConVolume(void) {//5 mm to cm double result = ConData(5, 0, 1); - TEST_ASSERT_EQUAL(0.005), result); + TEST_ASSERT_EQUAL(0.005, result); } void test_ConClock(void) {//5:00 to 5AM - double result = ConData(5, 0, 1); - TEST_ASSERT_EQUAL(5), result); + double result = ConClock(5, 0, 1); + TEST_ASSERT_EQUAL(5, result); } void test_ConTime(void) {//5 ms to s double result = ConData(5, 0, 1); - TEST_ASSERT_EQUAL(0.005), result); + TEST_ASSERT_EQUAL(0.005, result); } @@ -191,5 +192,3 @@ void test_performOperation_Division(void) { // Assert TEST_ASSERT_EQUAL_INT(4, result); } - -#endif // TEST diff --git a/target/test/cache/defines_dependency.yml b/target/test/cache/defines_dependency.yml new file mode 100644 index 0000000..7c38508 --- /dev/null +++ b/target/test/cache/defines_dependency.yml @@ -0,0 +1,9 @@ +--- +src/main/c/main_calculator.c: +- TEST +src/main/c/testForOperator.c: +- TEST +src/main/c/testForNumber.c: +- TEST +src/main/c/programmingMode.c: +- TEST diff --git a/target/test/cache/input.yml b/target/test/cache/input.yml new file mode 100644 index 0000000..5d1078e --- /dev/null +++ b/target/test/cache/input.yml @@ -0,0 +1,243 @@ +--- +:project: + :use_exceptions: false + :use_mocks: true + :compile_threads: 1 + :test_threads: 1 + :use_test_preprocessor: true + :use_preprocessor_directives: false + :use_deep_dependencies: false + :generate_deep_dependencies: true + :auto_link_deep_dependencies: false + :test_file_prefix: test_ + :options_paths: [] + :release_build: false + :use_auxiliary_dependencies: true + :build_root: target + :which_ceedling: gem + :ceedling_version: 0.31.1 + :default_tasks: + - test:all +:release_build: + :use_assembly: false + :artifacts: [] +:paths: + :test: + - "+:src/test/c/**" + - "-:src/test/c/support" + :source: + - "+:src/main/c/**" + :support: + - src/test/c/support + :include: [] + :libraries: [] + :test_toolchain_include: [] + :release_toolchain_include: [] +:files: + :test: [] + :source: [] + :assembly: [] + :support: [] + :include: [] +:environment: +- :rake_columns: '120' +:defines: + :test: + - &1 [] + - TEST + :test_preprocess: + - *1 + - TEST + :release: [] + :release_preprocess: [] + :use_test_definition: false + :common: [] +:libraries: + :flag: "-l${1}" + :path_flag: "-L ${1}" + :test: [] + :test_preprocess: [] + :release: [] + :release_preprocess: [] + :placement: :end + :system: + - m +:flags: {} +:extension: + :header: ".h" + :source: ".c" + :assembly: ".s" + :object: ".o" + :libraries: + - ".a" + - ".so" + :executable: ".out" + :map: ".map" + :list: ".lst" + :testpass: ".pass" + :testfail: ".fail" + :dependencies: ".d" +:unity: + :vendor_path: "/var/lib/gems/3.0.0/gems/ceedling-0.31.1/vendor" + :defines: [] +:cmock: + :vendor_path: "/var/lib/gems/3.0.0/gems/ceedling-0.31.1/vendor" + :defines: [] + :includes: [] + :mock_prefix: mock_ + :when_no_prototypes: :warn + :enforce_strict_ordering: true + :plugins: + - :ignore + - :callback + :treat_as: + uint8: HEX8 + uint16: HEX16 + uint32: UINT32 + int8: INT8 + bool: UINT8 + :mock_path: target/test/mocks + :verbosity: 3 + :unity_helper: false +:cexception: + :vendor_path: "/var/lib/gems/3.0.0/gems/ceedling-0.31.1/vendor" + :defines: [] +:test_runner: + :includes: [] + :file_suffix: _runner +:tools: + :test_compiler: + :executable: gcc + :name: default_test_compiler + :stderr_redirect: :none + :background_exec: :none + :optional: false + :arguments: + - '' + - '' + - -I"$": COLLECTION_PATHS_TEST_SUPPORT_SOURCE_INCLUDE_VENDOR + - -I"$": COLLECTION_PATHS_TEST_TOOLCHAIN_INCLUDE + - "-D$": COLLECTION_DEFINES_TEST_AND_VENDOR + - "-DGNU_COMPILER" + - "-g" + - '' + - -c "${1}" + - -o "${2}" + - "-MMD" + - -MF "${4}" + :test_fixture: + :executable: "${1}" + :name: default_test_fixture + :stderr_redirect: :auto + :background_exec: :none + :optional: false + :arguments: [] + :test_linker: + :executable: gcc + :name: default_test_linker + :stderr_redirect: :none + :background_exec: :none + :optional: false + :arguments: + - '' + - '' + - '' + - '"${1}"' + - "${5}" + - -o "${2}" + - '' + - "${4}" + - '' + :test_file_preprocessor: + :executable: gcc + :name: default_test_file_preprocessor + :stderr_redirect: :none + :background_exec: :none + :optional: false + :arguments: + - '' + - '' + - "-E" + - -I"$": COLLECTION_PATHS_TEST_SUPPORT_SOURCE_INCLUDE_VENDOR + - -I"$": COLLECTION_PATHS_TEST_TOOLCHAIN_INCLUDE + - "-D$": COLLECTION_DEFINES_TEST_AND_VENDOR + - "-D$": DEFINES_TEST_PREPROCESS + - "-DGNU_COMPILER" + - '"${1}"' + - -o "${2}" + :test_file_preprocessor_directives: + :executable: gcc + :name: default_test_file_preprocessor_directives + :stderr_redirect: :none + :background_exec: :none + :optional: false + :arguments: + - "-E" + - -I"$": COLLECTION_PATHS_TEST_SUPPORT_SOURCE_INCLUDE_VENDOR + - -I"$": COLLECTION_PATHS_TEST_TOOLCHAIN_INCLUDE + - "-D$": COLLECTION_DEFINES_TEST_AND_VENDOR + - "-D$": DEFINES_TEST_PREPROCESS + - "-DGNU_COMPILER" + - "-fdirectives-only" + - '"${1}"' + - -o "${2}" + :test_includes_preprocessor: + :executable: gcc + :name: default_test_includes_preprocessor + :stderr_redirect: :none + :background_exec: :none + :optional: false + :arguments: + - '' + - '' + - "-E" + - "-MM" + - "-MG" + - -I"$": COLLECTION_PATHS_TEST_SUPPORT_SOURCE_INCLUDE_VENDOR + - -I"$": COLLECTION_PATHS_TEST_TOOLCHAIN_INCLUDE + - "-D$": COLLECTION_DEFINES_TEST_AND_VENDOR + - "-D$": DEFINES_TEST_PREPROCESS + - "-DGNU_COMPILER" + - '"${1}"' +:test_compiler: + :arguments: [] +:test_linker: + :arguments: [] +:test_fixture: + :arguments: [] + :link_objects: [] +:test_includes_preprocessor: + :arguments: [] +:test_file_preprocessor: + :arguments: [] +:test_file_preprocessor_directives: + :arguments: [] +:test_dependencies_generator: + :arguments: [] +:release_compiler: + :arguments: [] +:release_linker: + :arguments: [] +:release_assembler: + :arguments: [] +:release_dependencies_generator: + :arguments: [] +:plugins: + :load_paths: + - "/var/lib/gems/3.0.0/gems/ceedling-0.31.1/lib/../plugins" + :enabled: + - stdout_pretty_tests_report + - module_generator + :display_raw_test_results: false + :stdout_pretty_tests_report_path: "/var/lib/gems/3.0.0/gems/ceedling-0.31.1/lib/../plugins/stdout_pretty_tests_report" + :module_generator_path: "/var/lib/gems/3.0.0/gems/ceedling-0.31.1/lib/../plugins/module_generator" +:gcov: + :reports: + - HtmlDetailed + :gcovr: + :html_medium_threshold: 75 + :html_high_threshold: 90 +:module_generator: + :project_root: "./" + :source_root: src/ + :test_root: test/ diff --git a/target/test/cache/test_calculator.c b/target/test/cache/test_calculator.c new file mode 100644 index 0000000..b5bac52 --- /dev/null +++ b/target/test/cache/test_calculator.c @@ -0,0 +1,502 @@ +#include "src/main/c/programmingMode.h" +#include "src/main/c/testForNumber.h" +#include "src/main/c/testForOperator.h" +#include "src/main/c/main_calculator.h" +#include "/var/lib/gems/3.0.0/gems/ceedling-0.31.1/vendor/unity/src/unity.h" + + + + +void setUp(void) + +{ + +} + + + +void tearDown(void) + +{ + +} + + + +void test_addition(void) + +{ + + double result = add(1, 2); + + UnityAssertEqualNumber((UNITY_INT)((3)), (UNITY_INT)((result)), ( + + ((void *)0) + + ), (UNITY_UINT)(19), UNITY_DISPLAY_STYLE_INT); + +} + + + +void test_minus(void) + +{ + + double result = minus(3, 1); + + UnityAssertEqualNumber((UNITY_INT)((2)), (UNITY_INT)((result)), ( + + ((void *)0) + + ), (UNITY_UINT)(25), UNITY_DISPLAY_STYLE_INT); + +} + + + +void test_multiply(void) + +{ + + double result = multiply(1, 2); + + UnityAssertEqualNumber((UNITY_INT)((2)), (UNITY_INT)((result)), ( + + ((void *)0) + + ), (UNITY_UINT)(31), UNITY_DISPLAY_STYLE_INT); + +} + + + +void test_divide(void) + +{ + + double result = divide(4, 2); + + UnityAssertEqualNumber((UNITY_INT)((2)), (UNITY_INT)((result)), ( + + ((void *)0) + + ), (UNITY_UINT)(37), UNITY_DISPLAY_STYLE_INT); + + + + double result1 = divide(4, 0); + + UnityAssertEqualNumber((UNITY_INT)((0)), (UNITY_INT)((result1)), ( + + ((void *)0) + + ), (UNITY_UINT)(40), UNITY_DISPLAY_STYLE_INT); + +} + + + +void test_ConMeter(void) { + + double result = ConMeter(5, 0, 1); + + UnityAssertEqualNumber((UNITY_INT)((0.5)), (UNITY_INT)((result)), ( + + ((void *)0) + + ), (UNITY_UINT)(45), UNITY_DISPLAY_STYLE_INT); + +} + + + +void test_ConMeterToFoot(void) { + + double result = ConMeterToFoot(5, 1, 0); + + UnityAssertEqualNumber((UNITY_INT)((16.4042)), (UNITY_INT)((result)), ( + + ((void *)0) + + ), (UNITY_UINT)(50), UNITY_DISPLAY_STYLE_INT); + +} + +void test_ConKilometerToMiles(void) { + + double result = ConKilometerToMiles(5, 0, 1); + + UnityAssertEqualNumber((UNITY_INT)((8.04672)), (UNITY_INT)((result)), ( + + ((void *)0) + + ), (UNITY_UINT)(54), UNITY_DISPLAY_STYLE_INT); + +} + + + +void test_ConGram(void) { + + double result = ConGram(5, 0, 1); + + UnityAssertEqualNumber((UNITY_INT)((0.005)), (UNITY_INT)((result)), ( + + ((void *)0) + + ), (UNITY_UINT)(59), UNITY_DISPLAY_STYLE_INT); + +} + + + +void test_ConGramToPounds(void) { + + double result = ConGramToPounds(5, 0, 0); + + UnityAssertEqualNumber((UNITY_INT)((11.0231)), (UNITY_INT)((result)), ( + + ((void *)0) + + ), (UNITY_UINT)(64), UNITY_DISPLAY_STYLE_INT); + +} + + + +void test_ConTemp(void) { + + double result = ConTemp(5, 0, 1); + + UnityAssertEqualNumber((UNITY_INT)((41)), (UNITY_INT)((result)), ( + + ((void *)0) + + ), (UNITY_UINT)(69), UNITY_DISPLAY_STYLE_INT); + +} + + + +void test_ConSpeed(void) { + + double result = ConSpeed(5, 0, 1); + + UnityAssertEqualNumber((UNITY_INT)((3.10686)), (UNITY_INT)((result)), ( + + ((void *)0) + + ), (UNITY_UINT)(74), UNITY_DISPLAY_STYLE_INT); + +} + + + +void test_ConLiter(void) { + + double result = ConLiter(5, 1, 0); + + UnityAssertEqualNumber((UNITY_INT)((5000)), (UNITY_INT)((result)), ( + + ((void *)0) + + ), (UNITY_UINT)(79), UNITY_DISPLAY_STYLE_INT); + +} + + + +void test_ConLiterToGallon(void) { + + double result = ConLiterToGallon(5, 0, 1); + + UnityAssertEqualNumber((UNITY_INT)((1.32086)), (UNITY_INT)((result)), ( + + ((void *)0) + + ), (UNITY_UINT)(84), UNITY_DISPLAY_STYLE_INT); + +} + + + +void test_ConData(void) { + + double result = ConData(5, 0, 1); + + UnityAssertEqualNumber((UNITY_INT)((0.005)), (UNITY_INT)((result)), ( + + ((void *)0) + + ), (UNITY_UINT)(89), UNITY_DISPLAY_STYLE_INT); + +} + + + +void test_ConArea(void) { + + double result = ConData(5, 0, 1); + + UnityAssertEqualNumber((UNITY_INT)((0.05)), (UNITY_INT)((result)), ( + + ((void *)0) + + ), (UNITY_UINT)(94), UNITY_DISPLAY_STYLE_INT); + +} + + + +void test_ConVolume(void) { + + double result = ConData(5, 0, 1); + + UnityAssertEqualNumber((UNITY_INT)((0.005)), (UNITY_INT)((result)), ( + + ((void *)0) + + ), (UNITY_UINT)(99), UNITY_DISPLAY_STYLE_INT); + +} + + + +void test_ConClock(void) { + + double result = ConClock(5, 0, 1); + + UnityAssertEqualNumber((UNITY_INT)((5)), (UNITY_INT)((result)), ( + + ((void *)0) + + ), (UNITY_UINT)(104), UNITY_DISPLAY_STYLE_INT); + +} + + + +void test_ConTime(void) { + + double result = ConData(5, 0, 1); + + UnityAssertEqualNumber((UNITY_INT)((0.005)), (UNITY_INT)((result)), ( + + ((void *)0) + + ), (UNITY_UINT)(109), UNITY_DISPLAY_STYLE_INT); + +} + + + + + + + +void test_squareRootFunction(void) { + + UnityAssertFloatsWithin((UNITY_FLOAT)((UNITY_FLOAT)((2.0)) * (UNITY_FLOAT)(0.00001f)), (UNITY_FLOAT)((UNITY_FLOAT)((2.0))), (UNITY_FLOAT)((UNITY_FLOAT)((squareRootFunction(4.0)))), (( + + ((void *)0) + + )), (UNITY_UINT)((UNITY_UINT)(115))); + +} + + + + + +void test_sineFunction(void) { + + + + UnityAssertFloatsWithin((UNITY_FLOAT)((UNITY_FLOAT)((0.0)) * (UNITY_FLOAT)(0.00001f)), (UNITY_FLOAT)((UNITY_FLOAT)((0.0))), (UNITY_FLOAT)((UNITY_FLOAT)((sineFunction(0.0)))), (( + + ((void *)0) + + )), (UNITY_UINT)((UNITY_UINT)(121))); + +} + + + + + +void test_cosineFunction(void) { + + + + UnityAssertFloatsWithin((UNITY_FLOAT)((UNITY_FLOAT)((1.0)) * (UNITY_FLOAT)(0.00001f)), (UNITY_FLOAT)((UNITY_FLOAT)((1.0))), (UNITY_FLOAT)((UNITY_FLOAT)((cosineFunction(0.0)))), (( + + ((void *)0) + + )), (UNITY_UINT)((UNITY_UINT)(127))); + +} + + + + + +void test_tangentFunction(void) { + + + + UnityAssertFloatsWithin((UNITY_FLOAT)((UNITY_FLOAT)((0.0)) * (UNITY_FLOAT)(0.00001f)), (UNITY_FLOAT)((UNITY_FLOAT)((0.0))), (UNITY_FLOAT)((UNITY_FLOAT)((tangentFunction(0.0)))), (( + + ((void *)0) + + )), (UNITY_UINT)((UNITY_UINT)(133))); + +} + + + + + +void test_logarithmFunction(void) { + + + + UnityAssertFloatsWithin((UNITY_FLOAT)((UNITY_FLOAT)((1.0)) * (UNITY_FLOAT)(0.00001f)), (UNITY_FLOAT)((UNITY_FLOAT)((1.0))), (UNITY_FLOAT)((UNITY_FLOAT)((logarithmFunction(10.0)))), (( + + ((void *)0) + + )), (UNITY_UINT)((UNITY_UINT)(139))); + +} + + + + + +void test_naturalLogarithmFunction(void) { + + + + UnityAssertFloatsWithin((UNITY_FLOAT)((UNITY_FLOAT)((0.0)) * (UNITY_FLOAT)(0.00001f)), (UNITY_FLOAT)((UNITY_FLOAT)((0.0))), (UNITY_FLOAT)((UNITY_FLOAT)((naturalLogarithmFunction(1.0)))), (( + + ((void *)0) + + )), (UNITY_UINT)((UNITY_UINT)(145))); + +} + + + + + +void test_logarithmBase2Function(void) { + + + + UnityAssertFloatsWithin((UNITY_FLOAT)((UNITY_FLOAT)((3.0)) * (UNITY_FLOAT)(0.00001f)), (UNITY_FLOAT)((UNITY_FLOAT)((3.0))), (UNITY_FLOAT)((UNITY_FLOAT)((logarithmBase2Function(8.0)))), (( + + ((void *)0) + + )), (UNITY_UINT)((UNITY_UINT)(151))); + +} + + + + + +void test_exponentialFunction(void) { + + + + UnityAssertFloatsWithin((UNITY_FLOAT)((UNITY_FLOAT)((1.0)) * (UNITY_FLOAT)(0.00001f)), (UNITY_FLOAT)((UNITY_FLOAT)((1.0))), (UNITY_FLOAT)((UNITY_FLOAT)((exponentialFunction(0.0)))), (( + + ((void *)0) + + )), (UNITY_UINT)((UNITY_UINT)(157))); + +} + + + + + +void test_performOperation_Subtraction(void) { + + + + int result; + + + + + + result = performOperation(10, '-', 3); + + + + + + UnityAssertEqualNumber((UNITY_INT)((7)), (UNITY_INT)((result)), ( + + ((void *)0) + + ), (UNITY_UINT)(169), UNITY_DISPLAY_STYLE_INT); + +} + + + + + +void test_performOperation_Multiplication(void) { + + + + int result; + + + + + + result = performOperation(4, '*', 6); + + + + + + UnityAssertEqualNumber((UNITY_INT)((24)), (UNITY_INT)((result)), ( + + ((void *)0) + + ), (UNITY_UINT)(181), UNITY_DISPLAY_STYLE_INT); + +} + + + + + +void test_performOperation_Division(void) { + + + + int result; + + + + + + result = performOperation(8, '/', 2); + + + + + + UnityAssertEqualNumber((UNITY_INT)((4)), (UNITY_INT)((result)), ( + + ((void *)0) + + ), (UNITY_UINT)(193), UNITY_DISPLAY_STYLE_INT); + +} diff --git a/target/test/dependencies/cmock.d b/target/test/dependencies/cmock.d new file mode 100644 index 0000000..6992af8 --- /dev/null +++ b/target/test/dependencies/cmock.d @@ -0,0 +1,6 @@ +target/test/out/c/cmock.o: \ + /var/lib/gems/3.0.0/gems/ceedling-0.31.1/vendor/cmock/src/cmock.c \ + /var/lib/gems/3.0.0/gems/ceedling-0.31.1/vendor/cmock/src/cmock.h \ + /var/lib/gems/3.0.0/gems/ceedling-0.31.1/vendor/cmock/src/cmock_internals.h \ + /var/lib/gems/3.0.0/gems/ceedling-0.31.1/vendor/unity/src/unity.h \ + /var/lib/gems/3.0.0/gems/ceedling-0.31.1/vendor/unity/src/unity_internals.h diff --git a/target/test/dependencies/force_build b/target/test/dependencies/force_build new file mode 100644 index 0000000..e69de29 diff --git a/target/test/dependencies/main_calculator.d b/target/test/dependencies/main_calculator.d new file mode 100644 index 0000000..13621c0 --- /dev/null +++ b/target/test/dependencies/main_calculator.d @@ -0,0 +1,2 @@ +target/test/out/c/main_calculator.o: src/main/c/main_calculator.c \ + src/main/c/main_calculator.h diff --git a/target/test/dependencies/programmingMode.d b/target/test/dependencies/programmingMode.d new file mode 100644 index 0000000..057dedb --- /dev/null +++ b/target/test/dependencies/programmingMode.d @@ -0,0 +1,2 @@ +target/test/out/c/programmingMode.o: src/main/c/programmingMode.c \ + src/main/c/programmingMode.h diff --git a/target/test/dependencies/testForNumber.d b/target/test/dependencies/testForNumber.d new file mode 100644 index 0000000..9ae49d2 --- /dev/null +++ b/target/test/dependencies/testForNumber.d @@ -0,0 +1,2 @@ +target/test/out/c/testForNumber.o: src/main/c/testForNumber.c \ + src/main/c/testForNumber.h diff --git a/target/test/dependencies/testForOperator.d b/target/test/dependencies/testForOperator.d new file mode 100644 index 0000000..e2b19f7 --- /dev/null +++ b/target/test/dependencies/testForOperator.d @@ -0,0 +1,2 @@ +target/test/out/c/testForOperator.o: src/main/c/testForOperator.c \ + src/main/c/testForOperator.h diff --git a/target/test/dependencies/test_calculator.d b/target/test/dependencies/test_calculator.d new file mode 100644 index 0000000..1d59c61 --- /dev/null +++ b/target/test/dependencies/test_calculator.d @@ -0,0 +1,5 @@ +target/test/out/c/test_calculator.o: src/test/c/test_calculator.c \ + /var/lib/gems/3.0.0/gems/ceedling-0.31.1/vendor/unity/src/unity.h \ + /var/lib/gems/3.0.0/gems/ceedling-0.31.1/vendor/unity/src/unity_internals.h \ + src/main/c/main_calculator.h src/main/c/testForOperator.h \ + src/main/c/testForNumber.h src/main/c/programmingMode.h diff --git a/target/test/dependencies/test_calculator_runner.d b/target/test/dependencies/test_calculator_runner.d new file mode 100644 index 0000000..4972796 --- /dev/null +++ b/target/test/dependencies/test_calculator_runner.d @@ -0,0 +1,4 @@ +target/test/out/c/test_calculator_runner.o: \ + target/test/runners/test_calculator_runner.c \ + /var/lib/gems/3.0.0/gems/ceedling-0.31.1/vendor/unity/src/unity.h \ + /var/lib/gems/3.0.0/gems/ceedling-0.31.1/vendor/unity/src/unity_internals.h diff --git a/target/test/dependencies/unity.d b/target/test/dependencies/unity.d new file mode 100644 index 0000000..ed190f0 --- /dev/null +++ b/target/test/dependencies/unity.d @@ -0,0 +1,4 @@ +target/test/out/c/unity.o: \ + /var/lib/gems/3.0.0/gems/ceedling-0.31.1/vendor/unity/src/unity.c \ + /var/lib/gems/3.0.0/gems/ceedling-0.31.1/vendor/unity/src/unity.h \ + /var/lib/gems/3.0.0/gems/ceedling-0.31.1/vendor/unity/src/unity_internals.h diff --git a/target/test/out/c/cmock.o b/target/test/out/c/cmock.o new file mode 100644 index 0000000000000000000000000000000000000000..a04fa7d88618a8d551915d287341146b15d602ba GIT binary patch literal 11200 zcmcIqdyHIF89#TXXLq`El+)Gwe(k7Npq1mSx-NvV90NDFSY1XYT9_okzWM z@3uvR+7)yIs9-ciDx${tB>IN}iJ(gq@ohC4Yhtj3APcAg8+D@?{l0U)@6MUiS^hBb zBs=GPzwde8-? zJ@fu~5w<>w?APu}&y3C|()W(e&zx#a-#r&}V>>-F*P5O=wUC~L_Pr7%)AydGstZq~ zH;v9ullm}oXXX+hyujrBTG%;}eh#%FZL|&GESVf#xb=HRXeZON;Ry)uqzIQn7$;u& zA*ur1I^D^ZH;tb3+f?kYd_{9lG;mKa_deuO9QTf%RBpk0gq+aG>#D!Aqo<%gm7c+| z5N1y{jV}1q*)0&tf(Ux+HWsuE&;v&JG?;ijeSar7h7Ruq^wmWA!XKt*W577s&{H)D z4RO!2m*Kj3Jyu{7?HZwhH)p!9J|YXX77$r@O{#G*9L@ZxU(GlU`>e8q^}=iYC{D=h z>DlMzRmeDhsv|F;!ylP5qZqBzYfPWr^+0hP&hY-EI4Xn@jJ=M|WI-1V@Hw?e5)j(Q z7DGh>Twp<|w<;q$tJwo?Ayaexu;Nz3z^&%pvRAJ9N0RQIl9#D@Zl+YKW;2230_r8T zwGjZloI>27SoUgeP{>qV@9;q{8+bXA5`yIN-XYI#E=Uqy#xE67rqK*>OW=Mn9tBE!`%M^%7HalIFWe&xo3AMOeKMP&9=ix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;~Z$n$-L-)H82vE7uAXS<&Y{w&!&E=!Lew#%RU9!i|`7f|~# zg0tPJg0tPZg72a@pHH0azDb|wYZUTqm-h?VAGW(r$g|x$1wUVR)3{gI<XgY&RwN_o=^sA)f9p-8}oy&71qhc83Vgc25OtFaAEqcp=aF1A?>ua|OSM{O8Z#vVQ&^Nt2Lg{Z|Uk z`Zoy9>*iaDvwr?w%i}_R1YIxB2zmbA%=<$AWb%K%kmvhxK3(4&=gTP0Ly5CL{JkIi znQu%izmVkT2zmZqQBcS)(9Mk|!8ehf6++KA@_(a{XFYcd-k0=j6?)z$yH5#u*7K6! zH!0k1I-y8^W6EMnI#EVtACf3*pzwTg^M&YM4O5t|` z;HNa;r!}YyKUPo*KeEvTKa0D9Y=s&Y*THWygmCD5q2!0wIAnR=Wn}@%$lv9n;mu;| z;}cn8|ir#?c=SM)v^6^fjQaVcB*b)EGk9OSnAS#FP<1ke_SFSSn#Q04_{ zFFD&~{wQQ{T*>R_WoqwdK{|5$7{3G=)G6EVr}l@$g)Q4Z4{e>!UsGIL_<$7S`NOwl zxjl~`C)?QagQ@rm-=9Y1kOsm(e&tNIMb%7 literal 0 HcmV?d00001 diff --git a/target/test/out/c/programmingMode.o b/target/test/out/c/programmingMode.o new file mode 100644 index 0000000000000000000000000000000000000000..8217c85f1bc95e7b93975578606156a869a1ee88 GIT binary patch literal 8080 zcmbtYYiu0V6~43UN!IZ@b{-~4Jpml@uy^fXC2YIb<+as4^X2*{uKJBEo!MKswfBqrJ{&Oe^6DGXsbXfM^#!P#ci#o=iE7W z_xgG*e)PyY_nz;3=iGB2bMGCWj(>SyNYj`QjqPG(O`wdu-&(Hs^J+g^!Irbn8@}}K z!9?*=qHx7X6elmI5>r*}>w%Cc#%H=;OH9QtCyH++&g8g7oTZ(H9k|AiTOS7 zIDKDXrqgeQ$LalrnT`I6!px?8|J2|tB(A+by?-h`yD5HcdN-5}KY>bbVe%UDt3iF{ z`sB6gjpgCs{o-RX-BJmi(`949F7q(O_?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(&N0{Vtt6apot_Uw^a>2goatqR84tJ4k>rS^ zv!S7^=OlZ3hrFa|k1%-uy4gt1F?|*QdE3jTZ7XFYGp38?&Df)X;PeYRl*0x~Jlx5> zjN|%qA#niTH!)_hl#_?_nZOu~51fRf!8qZdL4VS&IXarP(|0>5i_MA7GYQU6B#w^x zEEsu)hZ;bT!U&_YEl35E;%V~iqz-v*GB#>v?N~CVv>8pZSjHK(Vh?$-y_R>}cgA8# z(@SP7+qIGzn5{3gmxHrd-g9GFJDJNvZ|1i&AMyND)`?~qyK~Q;?Z*1S;k@nVY0Y$Y z=egSb_05~3T|FBJ#+M5PkI6>(;b{ts4PWoq5EE}E-@!rGP99|1c%!zec5&nhcr{l8 zhCdX(LC5PG&xZEYEect{2y8n8Gvhmc$$q$GKSFkXyp-%`OZHP_=jWiXhcg-yu~cT!3i_i;44TtxVFr*gc%%tir_dcmHH(PQ{2jN-c`9BfJ*r81@Nx`j`2lYKG%R@ ziTH<5qKGR*9_p3ip9CEFCg1kUcb{(&{vjO#e69hj@LmM(b+l{VoA-Nb)f;^W&Q;(t%V8zlS(N}MFc`Ju#@CUzT7U}u~7v7uYt<;EWkgY z@UIj9YYXtx3crc^<4AmY-cKm}4&tAY_;UVFDSU(Sc~;`f*;D{Id!!*8g`DTKLfOZuBsV!_9g;{Q?Mi#-3P;Hyc$uHYiiMKrD=PyP=C zXhZCu=!O)r{=_~h_+lKkDseueJa-c=;tVYW^{-Gk{vr+vh^quvx%ggH8ozURSpzXB4vrtrk!W9x-+sW?IsQu`lM`!8@W#{Ywi_i?rTNs1}*Bs%*5lLh&i(x6a9c@8*OSN+dmV;~oUqVyDg zqI?=GmHgZB@(P0MTNdFb%8OtWb(wd7{ACR5D)&XeaH%NElpP{}18lO0@e|lPP{Ek0 z|2X--EQnO9{%-gJ34SE`VpaA3A9swt6#xJL literal 0 HcmV?d00001 diff --git a/target/test/out/c/testForNumber.o b/target/test/out/c/testForNumber.o new file mode 100644 index 0000000000000000000000000000000000000000..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$_HrLd`$cRg_lx9B_Ond!vw{8WRQNF4*A!l4 zey_s+!hSx>991@@89$-eFK7KZh2O`W@T|jv@v{l(@=m1s{}8oKes6AIeW}84V||6f zi>#*={vhkC75+HuGXEGSeviM(Jj=D@7g--u_}i@SPavs^t7@b@>xd`P z^sbrCyRJwREm(QKq*v@>9ok4X@_EOan9^)GhFyZUp7t*AieJx{RT|cDtUgc5PBtZNCXkIMpd<9O%8=KM8Vsk?SYf1rX4u+J6=IUn>o{R{MV+_;mSu zlm4rO|LX&6Fn{>lg6uD!|LMjCGg0R8kMo4__ZaM}_Q!W{CB;C5xX3TMI%$(1?5+hc Rrs?{}IKZE@ECWI9{~t>!nJ@qV literal 0 HcmV?d00001 diff --git a/target/test/out/c/testForOperator.o b/target/test/out/c/testForOperator.o new file mode 100644 index 0000000000000000000000000000000000000000..3ae132c39263bebdd14ddc66fdfda9a659ba9784 GIT binary patch literal 4776 zcmbtWU2GIp6ux)2Q+B)UwzLT4M;K5L(4D2E0tE{NT-c)gL_vMPG}GDHAK9I$^8-{A zjTodM7%(xxLO0 z&pV#GmOtHoez$hB{e14~nlHm<)Yq3B$z9`MTbH|W`1^?jA_yFQI`RvD>Ed2ke5O@2c9SZ|i|Ks+%RV z;w)tAVMa8@6BrrC*WLK4m-p)cPfSC^n<5p3@fe|IVT*}xZ)(yiP5_Ao;#}CYB6u_> zYM6oyGGUX5O$a5@#XjL;U7iBNNAM&(cqN(mM4oKMOj6_s`CH53Yhp;Jk{A~|wO63F z7GXGL36yTZ;Ml1r1ZreVwPJySIOQO7EKuH%M&CUg!|oI)lr zhpV;^Mn5pEeVGx@4QwlLy^J4#BSu9At7`gXX|A{q7_4F)W@2wLC#((I-p=CA5!*8% zjnBlFO!|t651d5%mgyAP&``y9t-ih?f}32o%J!SpN?{N;f0PdAqTq%wa^{y^FVH6^ ziY83VQL*Zp0dq%2HhP{p$^zRDwz!@g9Yte0;hinJH9Px^pMBW&_XX}q)-rvoY&)K9 zm0?zy?^)Rz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MBe)mnz~kh E11_T%EdT%j literal 0 HcmV?d00001 diff --git a/target/test/out/c/test_calculator.o b/target/test/out/c/test_calculator.o new file mode 100644 index 0000000000000000000000000000000000000000..4ed0c1330950e0e18ed0136679d5ba225db4b5f3 GIT binary patch literal 19888 zcmcIr4U|;Hm9FlY9!3Y|hd~5H7?3}e>0$U2afBXb28IX&!hoP4^z`)1^xD%6{UeY? z;e=>JPmHi`(9I;P7!%zj>rdjYe+#o4-N>q&jcax{E*tR}kDjpg8NmIea>#UY>;sX~fTrA{s@#3MQyQRl1C>Vv8Y zzhBqB|E;?=|Ij1azVCml-><3;VTSfQ^r@$6#tS{|RjI*u5QNyxgYEmPTD@1>Z$EG_BY2) z$FVbP5r}&_mNbvxP&kUD(^0Mmp3`NR$*ap)8SO_={&bXQ1J6;ehQy~Sf2KOmx0TD! zrt%fGGQ>Z%&S*bvKSzM-;5 zhohxT5jsx*?&yqRlGMRj%8>>*94%*x(D_He9UZ4I&;i^D5feMP*qqBLT}@|$Dm4nz zk?%hL?aK_Zcky?hpH6W^rbG;02j@uS3lDvA*>g~>kP2Ys)NnjphzC17a84mrR*nu+ zW#xFas}ZH4L@KAsOzyIvv6Y%r06nP6f|^-oQsq4em0}}7gHDD}ty8+F!*yY>>*xb@ z^EmqLad$$r{F|J9XxzP+{sE_tkIP{CIXF}fE4>;{!9#&SE8PBd0i*P>MjuC7$QT`; zqK}jGak7QX(D7z{T%wPy`q-|I2lVlvs)E8)@bN&&t8gyIBCE^s4u*ZNN+3YV?-^Jzt|(h^=s*Mn^j+ zUOVcR;1vk`7^2o;JqkX8cHO+v8lClOC#yj_G`gKp({gM+8BiddAcMI)?qWUe;_C{ZOleS;&YhS4C+kNc|wEcjueZICo=4-Fi_Lm&H zHF7Gn>1{7lxi$siQZudAxpZI83rR14*T+-y?=ay@#ofxT*ISQ-8?R2OO%t-+Ya!trQ6iX#6jI z@UJi)ar5^xE_C)WF8DVwF8Dhb7ks=)=}_R8V)_PyDs?SI0t0^ww-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U)ro$nFOx6>e;gtdVVwQH zRp8vedj-zp=RSe+_#6~CUl%6?&exq@Sc8r0!`C&hUl`~6Mg$vb@%g^ARp5Nz+beLs zuihtczHbi-oSzFP1kTSLb}rYGpKEmpSoP%RW<=opT;3{he(vuTxHGR1IL}W81JtLzdAkZ{ zclE>9_i)Z-%(;(anRqf9&c%1;RJa>Ioey_qvnrfPn}oJ@$Gh^q@GWIe8aO&0?drQG~bXbS&N94nk5Qa}E;jaMj*8ocQrt)F< zY7<^y=5~>8yl+bne8d?CXP<>o2O2nJ>9*@AMkpr#0Yt;w;o&Occ}cW4A7bD z&oKTuP}T`;?RW!*@Pf!7xwxn7<-alWbawSIZel_}|6w1o9Q*HcfJse&R5iW~g~0nb zCRNPE=a^Ui`B)$Xe$Qc2#oP^G@Tz}xi^;+HQ4U=y>%Sc^ukw4S{1KvKBsU59y~>YJ z`Mf`ea`+6B<=;f*b3GxcLzW(FKN1%Pm(S+)wzYc76VE-|83?is0^WR1JKNc6J%>NwZ z_3FP_t)>KiuZ{hOd-9y0$G=zEnDe&Dc!YkT{yPuiUgHljQANzAo}8giYCtqh`mY9P RUirt+1nu9AjB}Lv{~wZ%#jgMW literal 0 HcmV?d00001 diff --git a/target/test/out/c/test_calculator_runner.o b/target/test/out/c/test_calculator_runner.o new file mode 100644 index 0000000000000000000000000000000000000000..80868899577e93198c9549cce76ecfbfcd7e70d0 GIT binary patch literal 14488 zcmeHNeQ;dWb-!;{yINWPkSyECAJ{9$#vehumaRJ2fGu0r7s!@tWUvWld0IVb7w?C7 z`_|alB(zS5T}WalLrYsXfT1Z(hN)>fBxIP5>(GFkX(lBM>2D0S(e~riA|y+F)GA`wUv68tagbj z#60oqS&QG@-GBV2FGN^hsr6T?C-!}dnYF8vXg+!2^5x5uuVMBCW{7F@$!7u7~7KcTe^|&;zCH2vjHiszQ#QwHT@NOY7of2YB!QtRf$OK{k$k{`A>$ zqZGjBrOV%|&6uY8--^9n?05aVKWM}1n@un>ANzLy1AePi-NR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SY;HNY2Vi10&qWn6U z)R_Dg295N8SH!^_*EDLl=^~lq0#?&@U{T;ZA-puZd_+~6=!Ibh59^TTz(3mZH7b8c z2{K-Hh|}!=YAU@+*E`Exn(bc=3iN5(Pm(>~2iTt5XBp3|=u_XjsAKzE425aGiR{rv zPn&7ntBi4&{oepawdU_2-H`5}LnF=~t`WD-^N05X(D$`*Ky7$uaig9kA%VVIZW&bk%W)jlpn5aa5tPDR4crE*pxyk_dx1QLJ z%f~>;b)EM)vez-Jn_PVFfLqnr=Hdj|$3dqjo?%YV6luqS M!1tBp=cfIC1JTBtlK=n! literal 0 HcmV?d00001 diff --git a/target/test/out/c/unity.o b/target/test/out/c/unity.o new file mode 100644 index 0000000000000000000000000000000000000000..d74bb7988cd22843556fdb5b6cee3700979b9752 GIT binary patch literal 57112 zcmd753w)Ht)j$61ZYFF<$c2P!xGZ-N5&|fKL?C0I?P z7QCWGpw(L1Dq3qT6@-8nqD9|msYRuVE!aS8%PY3>R;s^qX3lwb_9P4K+u!g1`OgRT zdFDIcIdkUBnaeZJB^!d%CV4#`hl9r%>qKIVI?lXzBj&1vNR2VrcFR?%C8Mx$gf#{!3p(fPQ$#&AN18% zU**>XFL+4U=KAodR`S<|PeqAH+593DcxF46`u|TOL{}r;+frp;AwL=4NOBW&* ztCc5UVyqVK7psM%nl_?C^BgRfo4h%w6%X8AA4-nGvkvC4)(2h3(cBbIeaeAGt^7MI zCfX*_bDEsB$p^DoT>j@b=?-wIyhp&XfZyC9zpemuZOlJ((wpyT%=gr5X9TBw0g|2k z&%@xE7ZO$<2X!o{_E7!{ZyYrtzqTR&^FQPtI_ry;Gw4u$?d!FTHT5}>4yP>;$qCu8 z=qAWXJs|whmR71-d+ttfj^~4??hJkbhc9wdSKaVx@Qc*u>oHc-XVub(=HrIz*WGaA6 zM}qZO&XHgP9`cU_PtsAF1*91nP>qytKMYBXpyJ1xyFzq2)r_47Ms#(#{woXG> zq4OzMpjC90&!>Fj5ZYw*t0wO;nfDmv^#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rFe;LwRYro^i zOeTIl5Ze#8201@1w_7b6b8e#rTN7o#Z2;`+GJgVKqKg3HI2%{%gYzj}cbQmA`=vob QtND+c9OQ<{9 literal 0 HcmV?d00001 diff --git a/target/test/out/test_calculator.out b/target/test/out/test_calculator.out new file mode 100755 index 0000000000000000000000000000000000000000..5c3f8d452b5df660eeb64c8b0d013f92182c3b44 GIT binary patch literal 90008 zcmeEv33wD$_HR{nSEsXfLI{Mt*(5-Ku5XPEv^*D&t8pp>u?=8%Ps?(IIJ| zUZ&6sq?5RsA}N(Y$E>eC>3^oYWTCgajN1vMtwjNn%JQy)9>wL49h@^tlzL9{R{H?4`Mj^<-|#SYRZh+)Ewo+6Jb=e zBA%D_2x~2HlD}$DyER8H{*UdtsZ)YpxF&e#=2NF;k_`DxIwV5}*^^B!^RY;f43Ecy zN|73=5U)K6;E3zAwd0A5_i~obPLpBafax<0X)(l2Tt)e;8UAg}@W~G+&cK7ZZBzCi zY=(cf8UD}B@ROV2&uxakrWyX`X86;Z;dcVxi8Jtc6O5+nJHHwJ`eyh`n&H3S3_l)x zC(ghl1&pTrncNJ2Pc!^|;76fn6_q1_L(Ut^knYAf{vU56OY+;wIbX^v3#XFF+N5B{>J>_M-qL{y^r;kF zpYKr?=M^ZPv|M5gQVOziVQlg0w1rEua?`T2ZpcuUEY0u~0L@*xEN6wXupq<3=t7L| z#iGQVG^iDL@;!O!r0rR=B4gpAh1q$F!A#F9^e8I|VPeUW?81UfVzEN93i1|@9J#Py zaa!&Y5?Gv>mJe;zVe#^Xi!+xmT#}ZRt*pq;%JnQ!P*@Jl9m6QKn5U*ppE_aU!a@B9 zD>60QNDVPkgMGgd{SGQ8 z9*)}>PP`JPuPIZ6yj&M$KPiePD~jS2>z?E%3ckIZ!A3und1nAWVJnx53*cu8enJ3$ zo8XTK;6E?;i2?j7!FLDn&k25V0N*awyEy^;IKfX1;7=F)%mDs;!Cw);Um^IX4l3+G zBcWA%N41Gh>x?|SCVqrug4UV%v~J0x-o$Sw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gt@aM2v-zK$HZfD0{_#JsnC9M59&{Qt|BV5-O@B)O&b;zv?~66PftG&%o#ubm zB5G71=&YY3{mMT#39i4XM3bL_>2I4O{WpJL()}yEI`Ln@^n2z=pZ=LiRU7DlgXsq} zeNcYIR)cxBePO9g*!1>(a*p($yv1PfnaBRirt{xz+x6qU9yb`TYyK+{c@TeAf2{q- o>p)L;{OSK`pGp67Zk)c$=4(N0E(0t|)b|Gs=0kx5fuQq$0bSE%)c^nh literal 0 HcmV?d00001 diff --git a/target/test/preprocess/files/test_calculator.c b/target/test/preprocess/files/test_calculator.c new file mode 100644 index 0000000..b5bac52 --- /dev/null +++ b/target/test/preprocess/files/test_calculator.c @@ -0,0 +1,502 @@ +#include "src/main/c/programmingMode.h" +#include "src/main/c/testForNumber.h" +#include "src/main/c/testForOperator.h" +#include "src/main/c/main_calculator.h" +#include "/var/lib/gems/3.0.0/gems/ceedling-0.31.1/vendor/unity/src/unity.h" + + + + +void setUp(void) + +{ + +} + + + +void tearDown(void) + +{ + +} + + + +void test_addition(void) + +{ + + double result = add(1, 2); + + UnityAssertEqualNumber((UNITY_INT)((3)), (UNITY_INT)((result)), ( + + ((void *)0) + + ), (UNITY_UINT)(19), UNITY_DISPLAY_STYLE_INT); + +} + + + +void test_minus(void) + +{ + + double result = minus(3, 1); + + UnityAssertEqualNumber((UNITY_INT)((2)), (UNITY_INT)((result)), ( + + ((void *)0) + + ), (UNITY_UINT)(25), UNITY_DISPLAY_STYLE_INT); + +} + + + +void test_multiply(void) + +{ + + double result = multiply(1, 2); + + UnityAssertEqualNumber((UNITY_INT)((2)), (UNITY_INT)((result)), ( + + ((void *)0) + + ), (UNITY_UINT)(31), UNITY_DISPLAY_STYLE_INT); + +} + + + +void test_divide(void) + +{ + + double result = divide(4, 2); + + UnityAssertEqualNumber((UNITY_INT)((2)), (UNITY_INT)((result)), ( + + ((void *)0) + + ), (UNITY_UINT)(37), UNITY_DISPLAY_STYLE_INT); + + + + double result1 = divide(4, 0); + + UnityAssertEqualNumber((UNITY_INT)((0)), (UNITY_INT)((result1)), ( + + ((void *)0) + + ), (UNITY_UINT)(40), UNITY_DISPLAY_STYLE_INT); + +} + + + +void test_ConMeter(void) { + + double result = ConMeter(5, 0, 1); + + UnityAssertEqualNumber((UNITY_INT)((0.5)), (UNITY_INT)((result)), ( + + ((void *)0) + + ), (UNITY_UINT)(45), UNITY_DISPLAY_STYLE_INT); + +} + + + +void test_ConMeterToFoot(void) { + + double result = ConMeterToFoot(5, 1, 0); + + UnityAssertEqualNumber((UNITY_INT)((16.4042)), (UNITY_INT)((result)), ( + + ((void *)0) + + ), (UNITY_UINT)(50), UNITY_DISPLAY_STYLE_INT); + +} + +void test_ConKilometerToMiles(void) { + + double result = ConKilometerToMiles(5, 0, 1); + + UnityAssertEqualNumber((UNITY_INT)((8.04672)), (UNITY_INT)((result)), ( + + ((void *)0) + + ), (UNITY_UINT)(54), UNITY_DISPLAY_STYLE_INT); + +} + + + +void test_ConGram(void) { + + double result = ConGram(5, 0, 1); + + UnityAssertEqualNumber((UNITY_INT)((0.005)), (UNITY_INT)((result)), ( + + ((void *)0) + + ), (UNITY_UINT)(59), UNITY_DISPLAY_STYLE_INT); + +} + + + +void test_ConGramToPounds(void) { + + double result = ConGramToPounds(5, 0, 0); + + UnityAssertEqualNumber((UNITY_INT)((11.0231)), (UNITY_INT)((result)), ( + + ((void *)0) + + ), (UNITY_UINT)(64), UNITY_DISPLAY_STYLE_INT); + +} + + + +void test_ConTemp(void) { + + double result = ConTemp(5, 0, 1); + + UnityAssertEqualNumber((UNITY_INT)((41)), (UNITY_INT)((result)), ( + + ((void *)0) + + ), (UNITY_UINT)(69), UNITY_DISPLAY_STYLE_INT); + +} + + + +void test_ConSpeed(void) { + + double result = ConSpeed(5, 0, 1); + + UnityAssertEqualNumber((UNITY_INT)((3.10686)), (UNITY_INT)((result)), ( + + ((void *)0) + + ), (UNITY_UINT)(74), UNITY_DISPLAY_STYLE_INT); + +} + + + +void test_ConLiter(void) { + + double result = ConLiter(5, 1, 0); + + UnityAssertEqualNumber((UNITY_INT)((5000)), (UNITY_INT)((result)), ( + + ((void *)0) + + ), (UNITY_UINT)(79), UNITY_DISPLAY_STYLE_INT); + +} + + + +void test_ConLiterToGallon(void) { + + double result = ConLiterToGallon(5, 0, 1); + + UnityAssertEqualNumber((UNITY_INT)((1.32086)), (UNITY_INT)((result)), ( + + ((void *)0) + + ), (UNITY_UINT)(84), UNITY_DISPLAY_STYLE_INT); + +} + + + +void test_ConData(void) { + + double result = ConData(5, 0, 1); + + UnityAssertEqualNumber((UNITY_INT)((0.005)), (UNITY_INT)((result)), ( + + ((void *)0) + + ), (UNITY_UINT)(89), UNITY_DISPLAY_STYLE_INT); + +} + + + +void test_ConArea(void) { + + double result = ConData(5, 0, 1); + + UnityAssertEqualNumber((UNITY_INT)((0.05)), (UNITY_INT)((result)), ( + + ((void *)0) + + ), (UNITY_UINT)(94), UNITY_DISPLAY_STYLE_INT); + +} + + + +void test_ConVolume(void) { + + double result = ConData(5, 0, 1); + + UnityAssertEqualNumber((UNITY_INT)((0.005)), (UNITY_INT)((result)), ( + + ((void *)0) + + ), (UNITY_UINT)(99), UNITY_DISPLAY_STYLE_INT); + +} + + + +void test_ConClock(void) { + + double result = ConClock(5, 0, 1); + + UnityAssertEqualNumber((UNITY_INT)((5)), (UNITY_INT)((result)), ( + + ((void *)0) + + ), (UNITY_UINT)(104), UNITY_DISPLAY_STYLE_INT); + +} + + + +void test_ConTime(void) { + + double result = ConData(5, 0, 1); + + UnityAssertEqualNumber((UNITY_INT)((0.005)), (UNITY_INT)((result)), ( + + ((void *)0) + + ), (UNITY_UINT)(109), UNITY_DISPLAY_STYLE_INT); + +} + + + + + + + +void test_squareRootFunction(void) { + + UnityAssertFloatsWithin((UNITY_FLOAT)((UNITY_FLOAT)((2.0)) * (UNITY_FLOAT)(0.00001f)), (UNITY_FLOAT)((UNITY_FLOAT)((2.0))), (UNITY_FLOAT)((UNITY_FLOAT)((squareRootFunction(4.0)))), (( + + ((void *)0) + + )), (UNITY_UINT)((UNITY_UINT)(115))); + +} + + + + + +void test_sineFunction(void) { + + + + UnityAssertFloatsWithin((UNITY_FLOAT)((UNITY_FLOAT)((0.0)) * (UNITY_FLOAT)(0.00001f)), (UNITY_FLOAT)((UNITY_FLOAT)((0.0))), (UNITY_FLOAT)((UNITY_FLOAT)((sineFunction(0.0)))), (( + + ((void *)0) + + )), (UNITY_UINT)((UNITY_UINT)(121))); + +} + + + + + +void test_cosineFunction(void) { + + + + UnityAssertFloatsWithin((UNITY_FLOAT)((UNITY_FLOAT)((1.0)) * (UNITY_FLOAT)(0.00001f)), (UNITY_FLOAT)((UNITY_FLOAT)((1.0))), (UNITY_FLOAT)((UNITY_FLOAT)((cosineFunction(0.0)))), (( + + ((void *)0) + + )), (UNITY_UINT)((UNITY_UINT)(127))); + +} + + + + + +void test_tangentFunction(void) { + + + + UnityAssertFloatsWithin((UNITY_FLOAT)((UNITY_FLOAT)((0.0)) * (UNITY_FLOAT)(0.00001f)), (UNITY_FLOAT)((UNITY_FLOAT)((0.0))), (UNITY_FLOAT)((UNITY_FLOAT)((tangentFunction(0.0)))), (( + + ((void *)0) + + )), (UNITY_UINT)((UNITY_UINT)(133))); + +} + + + + + +void test_logarithmFunction(void) { + + + + UnityAssertFloatsWithin((UNITY_FLOAT)((UNITY_FLOAT)((1.0)) * (UNITY_FLOAT)(0.00001f)), (UNITY_FLOAT)((UNITY_FLOAT)((1.0))), (UNITY_FLOAT)((UNITY_FLOAT)((logarithmFunction(10.0)))), (( + + ((void *)0) + + )), (UNITY_UINT)((UNITY_UINT)(139))); + +} + + + + + +void test_naturalLogarithmFunction(void) { + + + + UnityAssertFloatsWithin((UNITY_FLOAT)((UNITY_FLOAT)((0.0)) * (UNITY_FLOAT)(0.00001f)), (UNITY_FLOAT)((UNITY_FLOAT)((0.0))), (UNITY_FLOAT)((UNITY_FLOAT)((naturalLogarithmFunction(1.0)))), (( + + ((void *)0) + + )), (UNITY_UINT)((UNITY_UINT)(145))); + +} + + + + + +void test_logarithmBase2Function(void) { + + + + UnityAssertFloatsWithin((UNITY_FLOAT)((UNITY_FLOAT)((3.0)) * (UNITY_FLOAT)(0.00001f)), (UNITY_FLOAT)((UNITY_FLOAT)((3.0))), (UNITY_FLOAT)((UNITY_FLOAT)((logarithmBase2Function(8.0)))), (( + + ((void *)0) + + )), (UNITY_UINT)((UNITY_UINT)(151))); + +} + + + + + +void test_exponentialFunction(void) { + + + + UnityAssertFloatsWithin((UNITY_FLOAT)((UNITY_FLOAT)((1.0)) * (UNITY_FLOAT)(0.00001f)), (UNITY_FLOAT)((UNITY_FLOAT)((1.0))), (UNITY_FLOAT)((UNITY_FLOAT)((exponentialFunction(0.0)))), (( + + ((void *)0) + + )), (UNITY_UINT)((UNITY_UINT)(157))); + +} + + + + + +void test_performOperation_Subtraction(void) { + + + + int result; + + + + + + result = performOperation(10, '-', 3); + + + + + + UnityAssertEqualNumber((UNITY_INT)((7)), (UNITY_INT)((result)), ( + + ((void *)0) + + ), (UNITY_UINT)(169), UNITY_DISPLAY_STYLE_INT); + +} + + + + + +void test_performOperation_Multiplication(void) { + + + + int result; + + + + + + result = performOperation(4, '*', 6); + + + + + + UnityAssertEqualNumber((UNITY_INT)((24)), (UNITY_INT)((result)), ( + + ((void *)0) + + ), (UNITY_UINT)(181), UNITY_DISPLAY_STYLE_INT); + +} + + + + + +void test_performOperation_Division(void) { + + + + int result; + + + + + + result = performOperation(8, '/', 2); + + + + + + UnityAssertEqualNumber((UNITY_INT)((4)), (UNITY_INT)((result)), ( + + ((void *)0) + + ), (UNITY_UINT)(193), UNITY_DISPLAY_STYLE_INT); + +} diff --git a/target/test/preprocess/includes/test_calculator.c b/target/test/preprocess/includes/test_calculator.c new file mode 100644 index 0000000..56ed68c --- /dev/null +++ b/target/test/preprocess/includes/test_calculator.c @@ -0,0 +1,6 @@ +--- +- "/var/lib/gems/3.0.0/gems/ceedling-0.31.1/vendor/unity/src/unity.h" +- src/main/c/main_calculator.h +- src/main/c/testForOperator.h +- src/main/c/testForNumber.h +- src/main/c/programmingMode.h diff --git a/target/test/results/test_calculator.pass b/target/test/results/test_calculator.pass new file mode 100644 index 0000000..8999b26 --- /dev/null +++ b/target/test/results/test_calculator.pass @@ -0,0 +1,130 @@ +--- +:source: + :path: src/test/c + :file: test_calculator.c +:successes: +- :test: test_addition + :line: 16 + :message: '' + :unity_test_time: 0 +- :test: test_minus + :line: 22 + :message: '' + :unity_test_time: 0 +- :test: test_multiply + :line: 28 + :message: '' + :unity_test_time: 0 +- :test: test_divide + :line: 34 + :message: '' + :unity_test_time: 0 +- :test: test_ConMeter + :line: 43 + :message: '' + :unity_test_time: 0 +- :test: test_ConMeterToFoot + :line: 48 + :message: '' + :unity_test_time: 0 +- :test: test_ConKilometerToMiles + :line: 52 + :message: '' + :unity_test_time: 0 +- :test: test_ConGram + :line: 57 + :message: '' + :unity_test_time: 0 +- :test: test_ConGramToPounds + :line: 62 + :message: '' + :unity_test_time: 0 +- :test: test_ConTemp + :line: 67 + :message: '' + :unity_test_time: 0 +- :test: test_ConSpeed + :line: 72 + :message: '' + :unity_test_time: 0 +- :test: test_ConLiter + :line: 77 + :message: '' + :unity_test_time: 0 +- :test: test_ConLiterToGallon + :line: 82 + :message: '' + :unity_test_time: 0 +- :test: test_ConData + :line: 87 + :message: '' + :unity_test_time: 0 +- :test: test_ConArea + :line: 92 + :message: '' + :unity_test_time: 0 +- :test: test_ConVolume + :line: 97 + :message: '' + :unity_test_time: 0 +- :test: test_ConClock + :line: 102 + :message: '' + :unity_test_time: 0 +- :test: test_ConTime + :line: 107 + :message: '' + :unity_test_time: 0 +- :test: test_squareRootFunction + :line: 114 + :message: '' + :unity_test_time: 0 +- :test: test_sineFunction + :line: 119 + :message: '' + :unity_test_time: 0 +- :test: test_cosineFunction + :line: 125 + :message: '' + :unity_test_time: 0 +- :test: test_tangentFunction + :line: 131 + :message: '' + :unity_test_time: 0 +- :test: test_logarithmFunction + :line: 137 + :message: '' + :unity_test_time: 0 +- :test: test_naturalLogarithmFunction + :line: 143 + :message: '' + :unity_test_time: 0 +- :test: test_logarithmBase2Function + :line: 149 + :message: '' + :unity_test_time: 0 +- :test: test_exponentialFunction + :line: 155 + :message: '' + :unity_test_time: 0 +- :test: test_performOperation_Subtraction + :line: 161 + :message: '' + :unity_test_time: 0 +- :test: test_performOperation_Multiplication + :line: 173 + :message: '' + :unity_test_time: 0 +- :test: test_performOperation_Division + :line: 185 + :message: '' + :unity_test_time: 0 +:failures: [] +:ignores: [] +:counts: + :total: 29 + :passed: 29 + :failed: 0 + :ignored: 0 +:stdout: [] +:time: 0.001314320999881602 diff --git a/target/test/runners/test_calculator_runner.c b/target/test/runners/test_calculator_runner.c new file mode 100644 index 0000000..c2033f8 --- /dev/null +++ b/target/test/runners/test_calculator_runner.c @@ -0,0 +1,137 @@ +/* AUTOGENERATED FILE. DO NOT EDIT. */ + +/*=======Automagically Detected Files To Include=====*/ +#include "unity.h" + +int GlobalExpectCount; +int GlobalVerifyOrder; +char* GlobalOrderError; + +/*=======External Functions This Runner Calls=====*/ +extern void setUp(void); +extern void tearDown(void); +extern void test_addition(void); +extern void test_minus(void); +extern void test_multiply(void); +extern void test_divide(void); +extern void test_ConMeter(void); +extern void test_ConMeterToFoot(void); +extern void test_ConKilometerToMiles(void); +extern void test_ConGram(void); +extern void test_ConGramToPounds(void); +extern void test_ConTemp(void); +extern void test_ConSpeed(void); +extern void test_ConLiter(void); +extern void test_ConLiterToGallon(void); +extern void test_ConData(void); +extern void test_ConArea(void); +extern void test_ConVolume(void); +extern void test_ConClock(void); +extern void test_ConTime(void); +extern void test_squareRootFunction(void); +extern void test_sineFunction(void); +extern void test_cosineFunction(void); +extern void test_tangentFunction(void); +extern void test_logarithmFunction(void); +extern void test_naturalLogarithmFunction(void); +extern void test_logarithmBase2Function(void); +extern void test_exponentialFunction(void); +extern void test_performOperation_Subtraction(void); +extern void test_performOperation_Multiplication(void); +extern void test_performOperation_Division(void); + + +/*=======Mock Management=====*/ +static void CMock_Init(void) +{ + GlobalExpectCount = 0; + GlobalVerifyOrder = 0; + GlobalOrderError = NULL; +} +static void CMock_Verify(void) +{ +} +static void CMock_Destroy(void) +{ +} + +/*=======Test Reset Options=====*/ +void resetTest(void); +void resetTest(void) +{ + tearDown(); + CMock_Verify(); + CMock_Destroy(); + CMock_Init(); + setUp(); +} +void verifyTest(void); +void verifyTest(void) +{ + CMock_Verify(); +} + +/*=======Test Runner Used To Run Each Test=====*/ +static void run_test(UnityTestFunction func, const char* name, UNITY_LINE_TYPE line_num) +{ + Unity.CurrentTestName = name; + Unity.CurrentTestLineNumber = line_num; +#ifdef UNITY_USE_COMMAND_LINE_ARGS + if (!UnityTestMatches()) + return; +#endif + Unity.NumberOfTests++; + UNITY_CLR_DETAILS(); + UNITY_EXEC_TIME_START(); + CMock_Init(); + if (TEST_PROTECT()) + { + setUp(); + func(); + } + if (TEST_PROTECT()) + { + tearDown(); + CMock_Verify(); + } + CMock_Destroy(); + UNITY_EXEC_TIME_STOP(); + UnityConcludeTest(); +} + +/*=======MAIN=====*/ +int main(void) +{ + UnityBegin("test_calculator.c"); + run_test(test_addition, "test_addition", 16); + run_test(test_minus, "test_minus", 22); + run_test(test_multiply, "test_multiply", 28); + run_test(test_divide, "test_divide", 34); + run_test(test_ConMeter, "test_ConMeter", 43); + run_test(test_ConMeterToFoot, "test_ConMeterToFoot", 48); + run_test(test_ConKilometerToMiles, "test_ConKilometerToMiles", 52); + run_test(test_ConGram, "test_ConGram", 57); + run_test(test_ConGramToPounds, "test_ConGramToPounds", 62); + run_test(test_ConTemp, "test_ConTemp", 67); + run_test(test_ConSpeed, "test_ConSpeed", 72); + run_test(test_ConLiter, "test_ConLiter", 77); + run_test(test_ConLiterToGallon, "test_ConLiterToGallon", 82); + run_test(test_ConData, "test_ConData", 87); + run_test(test_ConArea, "test_ConArea", 92); + run_test(test_ConVolume, "test_ConVolume", 97); + run_test(test_ConClock, "test_ConClock", 102); + run_test(test_ConTime, "test_ConTime", 107); + run_test(test_squareRootFunction, "test_squareRootFunction", 114); + run_test(test_sineFunction, "test_sineFunction", 119); + run_test(test_cosineFunction, "test_cosineFunction", 125); + run_test(test_tangentFunction, "test_tangentFunction", 131); + run_test(test_logarithmFunction, "test_logarithmFunction", 137); + run_test(test_naturalLogarithmFunction, "test_naturalLogarithmFunction", 143); + run_test(test_logarithmBase2Function, "test_logarithmBase2Function", 149); + run_test(test_exponentialFunction, "test_exponentialFunction", 155); + run_test(test_performOperation_Subtraction, "test_performOperation_Subtraction", 161); + run_test(test_performOperation_Multiplication, "test_performOperation_Multiplication", 173); + run_test(test_performOperation_Division, "test_performOperation_Division", 185); + + return UnityEnd(); +} From a4d4537ae0abf81a9d6ba6c652ef074fa002dbab Mon Sep 17 00:00:00 2001 From: fdai7782 Date: Fri, 9 Feb 2024 19:09:20 +0100 Subject: [PATCH 101/125] added unittest to check wether the performOperation works when dividing by zero --- .vscode/c_cpp_properties.json | 28 +++++++++--------- .vscode/launch.json | 24 +++++++++++++++ .vscode/settings.json | 13 ++++---- src/main/c/programmingMode.c | 1 - src/test/c/test_calculator.c | 7 +++++ target/test/cache/test_calculator.c | 18 +++++++++++ target/test/out/c/programmingMode.o | Bin 8080 -> 8000 bytes target/test/out/c/test_calculator.o | Bin 19888 -> 20240 bytes target/test/out/c/test_calculator_runner.o | Bin 14488 -> 14744 bytes target/test/out/test_calculator.out | Bin 90008 -> 90144 bytes .../test/preprocess/files/test_calculator.c | 18 +++++++++++ target/test/results/test_calculator.pass | 10 +++++-- target/test/runners/test_calculator_runner.c | 2 ++ 13 files changed, 97 insertions(+), 24 deletions(-) create mode 100644 .vscode/launch.json diff --git a/.vscode/c_cpp_properties.json b/.vscode/c_cpp_properties.json index c11401d..a50e8e7 100644 --- a/.vscode/c_cpp_properties.json +++ b/.vscode/c_cpp_properties.json @@ -1,16 +1,16 @@ { - "configurations": [ - { - "name": "Linux", - "includePath": [ - "${workspaceFolder}/**" - ], - "defines": [], - "compilerPath": "/usr/bin/gcc", - "cStandard": "c17", - "cppStandard": "c++98", - "intelliSenseMode": "linux-gcc-x64" - } - ], - "version": 4 + "configurations": [ + { + "name": "linux-gcc-x64", + "includePath": [ + "${workspaceFolder}/**" + ], + "defines": [], + "compilerPath": "/usr/bin/gcc", + "cStandard": "${default}", + "cppStandard": "${default}", + "intelliSenseMode": "linux-gcc-x64" + } + ], + "version": 4 } \ No newline at end of file diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..4a9efca --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,24 @@ +{ + "version": "0.2.0", + "configurations": [ + { + "name": "C/C++ Runner: Debug Session", + "type": "cppdbg", + "request": "launch", + "args": [], + "stopAtEntry": false, + "externalConsole": false, + "cwd": "/home/js/Desktop/caschenrechner/src/test/c", + "program": "/home/js/Desktop/caschenrechner/src/test/c/build/Debug/outDebug", + "MIMode": "gdb", + "miDebuggerPath": "gdb", + "setupCommands": [ + { + "description": "Enable pretty-printing for gdb", + "text": "-enable-pretty-printing", + "ignoreFailures": true + } + ] + } + ] +} \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json index 355d4a1..f168e7d 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,8 +1,9 @@ { - "C_Cpp.errorSquiggles": "disabled", - "files.associations": { - "testforoperator.h": "c", - "testfornumber.h": "c", - "programmingmode.h": "c" - } + "C_Cpp.errorSquiggles": "disabled", + "files.associations": { + "testforoperator.h": "c", + "testfornumber.h": "c", + "programmingmode.h": "c" + }, + "C_Cpp_Runner.msvcBatchPath": "" } \ No newline at end of file diff --git a/src/main/c/programmingMode.c b/src/main/c/programmingMode.c index b96b77c..7457a95 100644 --- a/src/main/c/programmingMode.c +++ b/src/main/c/programmingMode.c @@ -38,7 +38,6 @@ int performOperation(int num1, char operatorType, int num2) { if (num2 != 0) { return num1 / num2; } else { - printf("Error: Division by zero\n"); return 0; } default: diff --git a/src/test/c/test_calculator.c b/src/test/c/test_calculator.c index dde64f2..641fceb 100644 --- a/src/test/c/test_calculator.c +++ b/src/test/c/test_calculator.c @@ -192,3 +192,10 @@ void test_performOperation_Division(void) { // Assert TEST_ASSERT_EQUAL_INT(4, result); } + +// Test case for dividing by zero +void test_performOperation_division_by_zero(void) { + + TEST_ASSERT_EQUAL_INT(0, performOperation(10, '/', 0)); + +} diff --git a/target/test/cache/test_calculator.c b/target/test/cache/test_calculator.c index b5bac52..3289aba 100644 --- a/target/test/cache/test_calculator.c +++ b/target/test/cache/test_calculator.c @@ -500,3 +500,21 @@ void test_performOperation_Division(void) { ), (UNITY_UINT)(193), UNITY_DISPLAY_STYLE_INT); } + + + + + +void test_performOperation_division_by_zero(void) { + + + + UnityAssertEqualNumber((UNITY_INT)((0)), (UNITY_INT)((performOperation(10, '/', 0))), ( + + ((void *)0) + + ), (UNITY_UINT)(199), UNITY_DISPLAY_STYLE_INT); + + + +} diff --git a/target/test/out/c/programmingMode.o b/target/test/out/c/programmingMode.o index 8217c85f1bc95e7b93975578606156a869a1ee88..55810a2c546417e96e6a4eaa70e90ff2bb8197cc 100644 GIT binary patch delta 966 zcmZ9KO=uHA6vy{XnwV&^Nm|qGCTTwK&?ZH6sco#qE>%JiL7^aqTCqY81}U_V`f;cR zQj6GwvF{)~i0wt1gGg9NPeMaIDHQSJCiEP0u@JCAK;P_cB<#R@J8ysg|C`y_DXKeT z#eT?_6CP00g~O9MnbPCY!eKHe6%Gd$mDOv_)pP?s*GE^=&4F~IK1fgRJDMa5OAR6C zqH_KBQllQymf;7ug|>k=Z3EhdZ4f}jZylR3h4<`n?^G;98untEap?_wV?P1Y_|YB% z1?%=O45HH!85#1ltA@q9y63v?NttX$ug;m(tX`eRTaF0iwMUL9W1L0Se~mG3zUN!vY>0x72YA~r!4p*clKkAFxok*;mt1q{ZChs_kyhtzi)+?& zeQ4A3!*A)oV3pR|Z=;?z%J6`wTR$=S7ex4OD-?Xl81IziJ`4S1K;eu|FIeclNw4ZO zW1)XcI)i2Ee8)nMo4Z`py#))6ncgD$yCnI&N%?+7iq`l3#Brj6%@A`DpN5Q5aB2%( zM;Pql!@vaWVKs0HCh>ssoEGoiX8(WshNkIJvF5=^;@UW0DoLNLXy=ywZu zg7YwfN+<>Em<_3L7E6?mVU6+}Cc-LYFdJ4~ubhTi#&S3XPq9X%f{9)gvY4fO6idA- o8+P*xyB6uEK8c9#rFsO*=B$>^ACtH)^f70bcsKbz9eO#lD@ delta 1097 zcmZ{jYe*DP6vyYxx|<98nhl$sb$4BnYSmtpxmw{!wrE0v&_nTo+Y>2T-Lw~q#oAg) z`8a)92z9?i-%^IC4}PdG^`QtK1RC{Wi6B^rf(17a>fV`aECU_5=iYOF|8wTdojb2; z#^vzPO5^v zCOT2;C5Re4eo0npjSBo}^i@|{bL$3ev<^RUN>x-b)}=-VS#(y7YOvnqgE8g2sfg#j z1{ADYz=c!!aicJ4bbV8{nVkkA#Ql~L`xt$4$mWRibygD}SKe7Z0*qnOwp|LdzBc;1 zPn1p$xFscJn+B-D+YT{Y%S3qu3S_MR(X5H>(}pNJLbV;l#$SZm4VsvW=(11?IZ-LzyorY;EG?*qFW6hK8^V|*en43)c)|a>Br{A;^XXVp zk}jG4CMhXsp0#Uq1&iH5zC*o{*yHYjW=y$*Fo#m140o}W_!3MIe+O5Ie~OYvHb2kT zl06vq1Yrde9vK#KmH1(lyfSRXR!z4<>vv@37-1 PUyV8I(&{Z^*j@A&nilT# diff --git a/target/test/out/c/test_calculator.o b/target/test/out/c/test_calculator.o index 4ed0c1330950e0e18ed0136679d5ba225db4b5f3..1761a8b2e3e28b3179dccd05af50c77d1a40113d 100644 GIT binary patch delta 3194 zcmZ`*eQXnD7{B+{Qm)A8mD=mc*at3Hig8TXTDGpG0}^{0nyYY zfG`tXc@hM{!C2I2LS#0`0L3hbfOCZ5#~+A>25>`-GEiYkg758~mp`6_H`#Od{(isb z^S!(E;BMB|&f5I)Q$|4pVv3H0Fv}7m4k$nRiEUE5+~Oo1rr^zz)J$Zh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)s%yJjLW2nQ4~GtcmDhyH-V z|J1*Am=Czkt6DTH?skGT=oWR03e6A>Dq_T91QkI)wfYJS>jF#%719pt!3e1Ve?>L@ zUVAF4#BO}YY%pCBB0kul+CYX8(*j{d;g_7yqg0WL5LY7ngKX`+0c*(3k7PqxsEVJ= ohMrJ__#qLh65qIt$ZFUMDdMXBkaAohgu@}R%s}5cs0`%(12cod1^@s6 diff --git a/target/test/out/test_calculator.out b/target/test/out/test_calculator.out index 5c3f8d452b5df660eeb64c8b0d013f92182c3b44..eb060c8e67f71c56901ae238bf282fa81aa772ed 100755 GIT binary patch delta 28677 zcmZ{N2YeJo`~S|~ZIVj}>Ai>agcN#DA_PKcp?6FGl`4p!;42&uP-6fIqZ}wID88bg zf`}j@B#1N>K|!%m6fqe5306cf|L-$1dv_e~e?Onu=b5KZpPk)H*6cIZ*BL7_*ty!w zv$h@MHF53WK`hTVCt2ollDC(!T$Xfrxy*aQSgWMR^0oTe(8qp$W%!8KHhg@-YtX9| zo7S&9v#%fDzRc3sh#Ij>%4O6^=p%u)l3(?Sh}xyN9Xz;S@g!SB?`w)%>cI_FF_nAJ z^A&xB2fdsxvPDGAR@_M*+@*Y*ErPAte#B<;4YQ+I4X2x$ni|f~Z6n<(_>Upg>~nr! zXwtZS7Vsm98c(;RNKIRLe&yuuQrvvvc9+}}PVVpg9GvCze{rA2W5eUvCf*763w%U)+~`Da z>G$EA(5;lZ4>)zlDDF7o-YvQJIJs*Sw}`kXDb>etC-)>j9v-I$`tV=EV_7@iEFzAL z;90mY;H439W7ea$P<1W40p%y8a=(y80r#_JH%C*uai_r6#VT*qPEf^H{C9LP1ohD*a`(#-859#iorwx&Z}6*#=`nEk zGC15v-lfdhwmc~+mUoB_Wc@gQ9@K0> zwF>I}g1RRzSU(X=QM@|w_E4jQOn7{-{vgSOm;Vo$e~Lw!XF@1W2>m(Xc0+f`G9Qf( zu6#e}*7>K#SP2DLBL6&1`!!%x-QN4ndJV`p{#!tx|5Aw57*!-l-83i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ator.c index b5bac52..3289aba 100644 --- a/target/test/preprocess/files/test_calculator.c +++ b/target/test/preprocess/files/test_calculator.c @@ -500,3 +500,21 @@ void test_performOperation_Division(void) { ), (UNITY_UINT)(193), UNITY_DISPLAY_STYLE_INT); } + + + + + +void test_performOperation_division_by_zero(void) { + + + + UnityAssertEqualNumber((UNITY_INT)((0)), (UNITY_INT)((performOperation(10, '/', 0))), ( + + ((void *)0) + + ), (UNITY_UINT)(199), UNITY_DISPLAY_STYLE_INT); + + + +} diff --git a/target/test/results/test_calculator.pass b/target/test/results/test_calculator.pass index 8999b26..7b87122 100644 --- a/target/test/results/test_calculator.pass +++ b/target/test/results/test_calculator.pass @@ -119,12 +119,16 @@ :line: 185 :message: '' :unity_test_time: 0 +- :test: test_performOperation_division_by_zero + :line: 197 + :message: '' + :unity_test_time: 0 :failures: [] :ignores: [] :counts: - :total: 29 - :passed: 29 + :total: 30 + :passed: 30 :failed: 0 :ignored: 0 :stdout: [] -:time: 0.001314320999881602 +:time: 0.0015222660003928468 diff --git a/target/test/runners/test_calculator_runner.c b/target/test/runners/test_calculator_runner.c index c2033f8..9459746 100644 --- a/target/test/runners/test_calculator_runner.c +++ b/target/test/runners/test_calculator_runner.c @@ -39,6 +39,7 @@ extern void test_exponentialFunction(void); extern void test_performOperation_Subtraction(void); extern void test_performOperation_Multiplication(void); extern void test_performOperation_Division(void); +extern void test_performOperation_division_by_zero(void); /*=======Mock Management=====*/ @@ -132,6 +133,7 @@ int main(void) run_test(test_performOperation_Subtraction, "test_performOperation_Subtraction", 161); run_test(test_performOperation_Multiplication, "test_performOperation_Multiplication", 173); run_test(test_performOperation_Division, "test_performOperation_Division", 185); + run_test(test_performOperation_division_by_zero, "test_performOperation_division_by_zero", 197); return UnityEnd(); } From 39a09e24cdc4ce0bdc6c9e9c6ab95dee05bd1935 Mon Sep 17 00:00:00 2001 From: fdai7801 Date: Fri, 9 Feb 2024 20:10:43 +0100 Subject: [PATCH 102/125] kabrel conver_dectobin --- src/main/c/BasicMode.c | 62 ++++++++---------------------------------- 1 file changed, 12 insertions(+), 50 deletions(-) diff --git a/src/main/c/BasicMode.c b/src/main/c/BasicMode.c index a8dcc27..2c09276 100644 --- a/src/main/c/BasicMode.c +++ b/src/main/c/BasicMode.c @@ -2,58 +2,20 @@ #include #include #include +#include +// convert decimal to binary +long long int DecToBin(long long int n) { + long long int bin = 0; + long long int rem, i = 1; + while (n != 0) { + rem = n % 2; + bin += rem * i; + i *= 10; + n /= 2; + } -void BasicMode() { - char endtmp = '0'; //0 false, 1 true - double result = 0; - double numbers[100] = {0.0}; - char operators[100]; - - do { - //100 doubles in this array goes through the for loop till 100 numbers or = is entered - for (int i = 0; i < 100; i++) { - printf("Enter a Number: "); - numbers[i] = testForNumber(); //gets number - - printf("Enter a operation: "); - operators[i] = testForOperator(); //gets operator - } - } while (endtmp != '1'); - - - for (int i = 0; i < 100; i++) {//checks all operators to check for priority - if ((operators[i] == '/' || operators[i] == '*') && i > 1) { //if operators[i] == / or * and i>1 so you dont get numbers[-1] - if (operators[i] == '/') { - result += divide(numbers[i - 1], numbers[i]); //divides if char is / and adds number to the result - } - // for all calculations we take the number and the number before that - else { // and do the operation - result += multiply(numbers[i - 1], numbers[i]); //multiplys if char is * and adds number to the result - } - } - - else if ((operators[i] == '+' || operators[i] == '-') && i > 1) { - if (operators[i] == '+') { - result += add(numbers[i - 1], numbers[i]); //adds if char is + and adds number to the result - } - - else { - result += minus(numbers[i - 1], numbers[i]); //subtrakts if char is - and adds number to the result - } - } - - else if (i<=1 && operators[i] == '=') { //if there are less then 2 numbers in the array - result = numbers[i]; //set result to the 0 digit - } - - else if (operators[i] == '=') { //if char is = - printf("The result is: %f", result); //print out the result - i = 100; - break; - } - i++; - } + return bin; } From d2a5222a382c7765bb40d40ad59e4a9d4822852c Mon Sep 17 00:00:00 2001 From: fdai7801 Date: Fri, 9 Feb 2024 20:13:44 +0100 Subject: [PATCH 103/125] kabrel conver_bintodec --- src/main/c/BasicMode.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/main/c/BasicMode.c b/src/main/c/BasicMode.c index 2c09276..0b1bc48 100644 --- a/src/main/c/BasicMode.c +++ b/src/main/c/BasicMode.c @@ -19,3 +19,16 @@ long long int DecToBin(long long int n) { return bin; } +// convert binary to decimal +long long int BinToDec(long long int n) { + long long int dec = 0, i = 0, rem; + + while (n != 0) { + rem = n % 10; + dec += rem * pow(2, i); + i++; + n /= 10; + } + + return dec; +} From 780c92fd02e6e61badbb638ac981e1eb497ee10e Mon Sep 17 00:00:00 2001 From: fdai7801 Date: Fri, 9 Feb 2024 20:27:22 +0100 Subject: [PATCH 104/125] kabrel new file --- src/main/c/BasicMode.h | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 src/main/c/BasicMode.h diff --git a/src/main/c/BasicMode.h b/src/main/c/BasicMode.h new file mode 100644 index 0000000..e69de29 From c7e0d8e98c5b41f34950be5e75245a6168f067f5 Mon Sep 17 00:00:00 2001 From: fdai7801 Date: Fri, 9 Feb 2024 20:32:51 +0100 Subject: [PATCH 105/125] kabrel --- src/main/c/BasicMode.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/main/c/BasicMode.h b/src/main/c/BasicMode.h index e69de29..93e96e4 100644 --- a/src/main/c/BasicMode.h +++ b/src/main/c/BasicMode.h @@ -0,0 +1,7 @@ +#ifndef BasicMode +#define BasicMode + +long long int DecToBin(long long int n); + + +#endif // BasicMode From 2f8ff3a6973c23bf9050b914c3faf2d2cc1da95b Mon Sep 17 00:00:00 2001 From: fdai7801 Date: Fri, 9 Feb 2024 20:35:26 +0100 Subject: [PATCH 106/125] kabrel --- src/main/c/BasicMode.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/c/BasicMode.h b/src/main/c/BasicMode.h index 93e96e4..69969a8 100644 --- a/src/main/c/BasicMode.h +++ b/src/main/c/BasicMode.h @@ -2,6 +2,6 @@ #define BasicMode long long int DecToBin(long long int n); - +long long int BinToDec(long long int n); #endif // BasicMode From 9fb9199189e4964b538ce2e12b6abbae774fde22 Mon Sep 17 00:00:00 2001 From: fdai7801 Date: Fri, 9 Feb 2024 21:52:17 +0100 Subject: [PATCH 107/125] kabrel --- src/main/c/BasicMode.c | 19 ++++++++++++++++++- src/main/c/BasicMode.h | 4 ++++ 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/src/main/c/BasicMode.c b/src/main/c/BasicMode.c index 0b1bc48..95879f0 100644 --- a/src/main/c/BasicMode.c +++ b/src/main/c/BasicMode.c @@ -2,7 +2,7 @@ #include #include #include -#include +#include "BasicMode" // convert decimal to binary @@ -32,3 +32,20 @@ long long int BinToDec(long long int n) { return dec; } +//addition +long long int addition(long long int a, long long int b) { + long long int dec1, dec2; + dec1 = BinToDec(a); + dec2 = BinToDec(b); + dec1 = dec1 + dec2; + dec2 = DecToBin(dec1); + + return dec2; +} + +int main() { + + + + return 0; +} diff --git a/src/main/c/BasicMode.h b/src/main/c/BasicMode.h index 69969a8..454f8ac 100644 --- a/src/main/c/BasicMode.h +++ b/src/main/c/BasicMode.h @@ -3,5 +3,9 @@ long long int DecToBin(long long int n); long long int BinToDec(long long int n); +long long int addition(long long int a, long long int b); + + + #endif // BasicMode From eb359e3ccaac8cf095b68ec1af6288b8de8fce75 Mon Sep 17 00:00:00 2001 From: fdai7801 Date: Fri, 9 Feb 2024 21:04:04 +0000 Subject: [PATCH 108/125] Update BasicMode.c --- src/main/c/BasicMode.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/main/c/BasicMode.c b/src/main/c/BasicMode.c index 95879f0..da2431d 100644 --- a/src/main/c/BasicMode.c +++ b/src/main/c/BasicMode.c @@ -2,7 +2,7 @@ #include #include #include -#include "BasicMode" +#include "BasicMode.h" // convert decimal to binary @@ -42,6 +42,16 @@ long long int addition(long long int a, long long int b) { return dec2; } +// multiplication +long long int multiplication(long long int a, long long int b) { + long long int dec1, dec2; + dec1 = BinToDec(a); + dec2 = BinToDec(b); + dec1 = dec1 * dec2; + dec2 = DecToBin(dec1); + + return dec2; +} int main() { From 0ffb228ff2f8c798a0da7a449c6f59586f29fe6c Mon Sep 17 00:00:00 2001 From: fdai7801 Date: Fri, 9 Feb 2024 21:04:54 +0000 Subject: [PATCH 109/125] kabrel --- src/main/c/BasicMode.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/main/c/BasicMode.c b/src/main/c/BasicMode.c index da2431d..7cab631 100644 --- a/src/main/c/BasicMode.c +++ b/src/main/c/BasicMode.c @@ -52,6 +52,17 @@ long long int multiplication(long long int a, long long int b) { return dec2; } +//subtraction +long long int subtraction(long long int a, long long int b) { + long long int dec1, dec2; + dec1 = BinToDec(a); + dec2 = BinToDec(b); + dec1 = dec1 - dec2; + dec2 = DecToBin(dec1); + + return dec2; +} + int main() { From ef5772d779b813744420e28e0bea2c619d0ed8a1 Mon Sep 17 00:00:00 2001 From: fdai7801 Date: Fri, 9 Feb 2024 21:08:06 +0000 Subject: [PATCH 110/125] kabrel --- src/main/c/BasicMode.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main/c/BasicMode.c b/src/main/c/BasicMode.c index 7cab631..a9e60fc 100644 --- a/src/main/c/BasicMode.c +++ b/src/main/c/BasicMode.c @@ -65,8 +65,14 @@ long long int subtraction(long long int a, long long int b) { int main() { + long long int bin1, bin2, dec, result; + char auswahl1, auswahl2; + do { + printf("what do you want to do?(A for conversion from decimal base to binary base ,B for conversion from binary base to decimal base ,C for Operation in binary base, Q for stop):"); + scanf(" %c", &auswahl1); + } while (auswahl1 != 'Q' && auswahl1 != 'q'); return 0; } From 1ea5d7ab6570e8dd470b7e7b712541e3fa39049e Mon Sep 17 00:00:00 2001 From: fdai7801 Date: Fri, 9 Feb 2024 21:11:01 +0000 Subject: [PATCH 111/125] kabrel --- src/main/c/BasicMode.c | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/src/main/c/BasicMode.c b/src/main/c/BasicMode.c index a9e60fc..a338063 100644 --- a/src/main/c/BasicMode.c +++ b/src/main/c/BasicMode.c @@ -71,6 +71,40 @@ int main() { do { printf("what do you want to do?(A for conversion from decimal base to binary base ,B for conversion from binary base to decimal base ,C for Operation in binary base, Q for stop):"); scanf(" %c", &auswahl1); + switch (auswahl1) { + case 'A': + case 'a': + printf("Enter a decimal number: "); + scanf("%lld", &dec); + bin1 = DecToBin(dec); + printf("%lld in decimal = %lld in binary\n", dec, bin1); + break; + + case 'B': + case 'b': + printf("Enter a binary number: "); + scanf("%lld", &bin1); + dec = BinToDec(bin1); + printf("%lld in binary = %lld in decimalprintf\n"); + break; + + case 'C': + case 'c': + + + + + + + + break; + case 'Q': + case 'q': + printf("The programme is terminated.\n"); + break; + default: + printf("Invalid selection. Please enter again.\n"); + } } while (auswahl1 != 'Q' && auswahl1 != 'q'); From cf87762320ccda06629eed05fbd3d9b85d20f6c9 Mon Sep 17 00:00:00 2001 From: fdai7801 Date: Fri, 9 Feb 2024 21:12:50 +0000 Subject: [PATCH 112/125] kabrel --- src/main/c/BasicMode.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/c/BasicMode.c b/src/main/c/BasicMode.c index a338063..cabb5c4 100644 --- a/src/main/c/BasicMode.c +++ b/src/main/c/BasicMode.c @@ -90,12 +90,15 @@ int main() { case 'C': case 'c': + do { + printf("which operation would you like to have?(+ for addition, - for subtraction,* for multiplication and r for return :"); + scanf(" %c", &auswahl2); - + } while (auswahl2 != 'R' && auswahl2 != 'r'); break; case 'Q': From 08832c5a8a8d6f749b755e81451741aa81ccbd4c Mon Sep 17 00:00:00 2001 From: fdai7801 Date: Fri, 9 Feb 2024 21:15:02 +0000 Subject: [PATCH 113/125] kabrel --- src/main/c/BasicMode.c | 97 ++++++++++++++++++++++++++++-------------- 1 file changed, 64 insertions(+), 33 deletions(-) diff --git a/src/main/c/BasicMode.c b/src/main/c/BasicMode.c index cabb5c4..a9ea1f8 100644 --- a/src/main/c/BasicMode.c +++ b/src/main/c/BasicMode.c @@ -65,40 +65,71 @@ long long int subtraction(long long int a, long long int b) { int main() { - long long int bin1, bin2, dec, result; - char auswahl1, auswahl2; - - do { - printf("what do you want to do?(A for conversion from decimal base to binary base ,B for conversion from binary base to decimal base ,C for Operation in binary base, Q for stop):"); - scanf(" %c", &auswahl1); - switch (auswahl1) { - case 'A': - case 'a': - printf("Enter a decimal number: "); - scanf("%lld", &dec); - bin1 = DecToBin(dec); - printf("%lld in decimal = %lld in binary\n", dec, bin1); - break; - - case 'B': - case 'b': - printf("Enter a binary number: "); - scanf("%lld", &bin1); - dec = BinToDec(bin1); - printf("%lld in binary = %lld in decimalprintf\n"); - break; - - case 'C': - case 'c': - do { - printf("which operation would you like to have?(+ for addition, - for subtraction,* for multiplication and r for return :"); - scanf(" %c", &auswahl2); - - - + long long int bin1, bin2, dec, result; + char auswahl1, auswahl2; + + do { + printf("what do you want to do?(A for conversion from decimal base to binary base ,B for conversion from binary base to decimal base ,C for Operation in binary base, Q for stop):"); + scanf(" %c", &auswahl1); + switch (auswahl1) { + case 'A': + case 'a': + printf("Enter a decimal number: "); + scanf("%lld", &dec); + bin1 = DecToBin(dec); + printf("%lld in decimal = %lld in binary\n", dec, bin1); + break; + case 'B': + case 'b': + printf("Enter a binary number: "); + scanf("%lld", &bin1); + dec = BinToDec(bin1); + printf("%lld in binary = %lld in decimalprintf\n"); + break; - } while (auswahl2 != 'R' && auswahl2 != 'r'); + case 'C': + case 'c': + do { + printf("which operation would you like to have?(+ for addition, - for subtraction,* for multiplication and r for return :"); + scanf(" %c", &auswahl2); + switch (auswahl2) { + case '+': + printf("enter the first binary number: "); + scanf("%lld", &bin1); + printf("enter the second binary number: "); + scanf("%lld", &bin2); + result = addition(bin1, bin2); + + printf("%lld+%d = %lld\n", bin1, bin2, result); + break; + case '-': + printf("enter the first binary number: "); + scanf("%lld", &bin1); + printf("enter the second binary number: "); + scanf("%lld", &bin2); + result = subtraction(bin1, bin2); + + printf("%lld-%lld = %lld\n", bin1, bin2, result); + break; + case '*': + printf("enter the first binary number: "); + scanf("%lld", &bin1); + printf("enter the second binary number: "); + scanf("%lld", &bin2); + result = multiplication(bin1, bin2); + + printf("%lld*%d = %lld\n", bin1, bin2, result); + break; + + case 'R': + case 'r': + printf("return.\n"); + break; + default: + printf("Invalid selection. Please enter again.\n"); + } + } while (auswahl2 != 'R' && auswahl2 != 'r'); break; case 'Q': @@ -108,8 +139,8 @@ int main() { default: printf("Invalid selection. Please enter again.\n"); } + } while (auswahl1 != 'Q' && auswahl1 != 'q'); - } while (auswahl1 != 'Q' && auswahl1 != 'q'); return 0; } From 48cf8c5bd4942739762da64a4a53f22ea000738c Mon Sep 17 00:00:00 2001 From: fdai7801 Date: Fri, 9 Feb 2024 21:26:46 +0000 Subject: [PATCH 114/125] Update --- src/main/c/BasicMode.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/c/BasicMode.h b/src/main/c/BasicMode.h index 454f8ac..43a3522 100644 --- a/src/main/c/BasicMode.h +++ b/src/main/c/BasicMode.h @@ -4,6 +4,7 @@ long long int DecToBin(long long int n); long long int BinToDec(long long int n); long long int addition(long long int a, long long int b); +long long int multiplication(long long int a, long long int b); From 165dc110a2bab1490e8040f8985d21121e3cab90 Mon Sep 17 00:00:00 2001 From: fdai7801 Date: Fri, 9 Feb 2024 21:28:21 +0000 Subject: [PATCH 115/125] Update BasicMode.h --- src/main/c/BasicMode.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/c/BasicMode.h b/src/main/c/BasicMode.h index 43a3522..cb621c8 100644 --- a/src/main/c/BasicMode.h +++ b/src/main/c/BasicMode.h @@ -5,6 +5,7 @@ long long int DecToBin(long long int n); long long int BinToDec(long long int n); long long int addition(long long int a, long long int b); long long int multiplication(long long int a, long long int b); +long long int subtraction(long long int a, long long int b); From 2619416b5172c95eaf40853aafcfadcaafd27c96 Mon Sep 17 00:00:00 2001 From: fdai7801 Date: Fri, 9 Feb 2024 21:33:18 +0000 Subject: [PATCH 116/125] Update --- src/test/c/test_calculator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/c/test_calculator.c b/src/test/c/test_calculator.c index 641fceb..7e029bd 100644 --- a/src/test/c/test_calculator.c +++ b/src/test/c/test_calculator.c @@ -1,5 +1,5 @@ #include "unity.h" - +#include "BasicMode" #include "main_calculator.h" #include "testForOperator.h" #include "testForNumber.h" From 1452d3f6c79d9a71f7eceae7eca4e95f407c5e73 Mon Sep 17 00:00:00 2001 From: fdai7801 Date: Fri, 9 Feb 2024 21:40:53 +0000 Subject: [PATCH 117/125] Update BasicMode.c --- src/main/c/BasicMode.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/c/BasicMode.c b/src/main/c/BasicMode.c index a9ea1f8..fa617f9 100644 --- a/src/main/c/BasicMode.c +++ b/src/main/c/BasicMode.c @@ -33,7 +33,7 @@ long long int BinToDec(long long int n) { return dec; } //addition -long long int addition(long long int a, long long int b) { +long long int additionbin(long long int a, long long int b) { long long int dec1, dec2; dec1 = BinToDec(a); dec2 = BinToDec(b); @@ -43,7 +43,7 @@ long long int addition(long long int a, long long int b) { return dec2; } // multiplication -long long int multiplication(long long int a, long long int b) { +long long int multiplicationbin(long long int a, long long int b) { long long int dec1, dec2; dec1 = BinToDec(a); dec2 = BinToDec(b); @@ -53,7 +53,7 @@ long long int multiplication(long long int a, long long int b) { return dec2; } //subtraction -long long int subtraction(long long int a, long long int b) { +long long int subtractionbin(long long int a, long long int b) { long long int dec1, dec2; dec1 = BinToDec(a); dec2 = BinToDec(b); @@ -99,7 +99,7 @@ int main() { scanf("%lld", &bin1); printf("enter the second binary number: "); scanf("%lld", &bin2); - result = addition(bin1, bin2); + result = additionbin(bin1, bin2); printf("%lld+%d = %lld\n", bin1, bin2, result); break; @@ -108,7 +108,7 @@ int main() { scanf("%lld", &bin1); printf("enter the second binary number: "); scanf("%lld", &bin2); - result = subtraction(bin1, bin2); + result = subtractionbin(bin1, bin2); printf("%lld-%lld = %lld\n", bin1, bin2, result); break; @@ -117,7 +117,7 @@ int main() { scanf("%lld", &bin1); printf("enter the second binary number: "); scanf("%lld", &bin2); - result = multiplication(bin1, bin2); + result = multiplicationbin(bin1, bin2); printf("%lld*%d = %lld\n", bin1, bin2, result); break; From e235449e1a8880d7acdffd976028d16ef2c4a4a5 Mon Sep 17 00:00:00 2001 From: fdai7801 Date: Fri, 9 Feb 2024 21:41:42 +0000 Subject: [PATCH 118/125] Update BasicMode.h --- src/main/c/BasicMode.h | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/main/c/BasicMode.h b/src/main/c/BasicMode.h index cb621c8..dfee843 100644 --- a/src/main/c/BasicMode.h +++ b/src/main/c/BasicMode.h @@ -3,11 +3,8 @@ long long int DecToBin(long long int n); long long int BinToDec(long long int n); -long long int addition(long long int a, long long int b); -long long int multiplication(long long int a, long long int b); -long long int subtraction(long long int a, long long int b); - - - +long long int additionbin(long long int a, long long int b); +long long int multiplicationbin(long long int a, long long int b); +long long int subtractionbin(long long int a, long long int b); #endif // BasicMode From 2d7710b07e9f6c38fd58bb3e483351c021b852d8 Mon Sep 17 00:00:00 2001 From: fdai7801 Date: Fri, 9 Feb 2024 21:53:29 +0000 Subject: [PATCH 119/125] Update --- src/test/c/test_calculator.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/test/c/test_calculator.c b/src/test/c/test_calculator.c index 7e029bd..ba35300 100644 --- a/src/test/c/test_calculator.c +++ b/src/test/c/test_calculator.c @@ -199,3 +199,15 @@ void test_performOperation_division_by_zero(void) { TEST_ASSERT_EQUAL_INT(0, performOperation(10, '/', 0)); } +void test_DecToBin(void) { + // Arrange + long long int result; + + // Act + result = DecToBin(8); + + // Assert + TEST_ASSERT_EQUAL_INT64(100, result); +} + + From 303f9814bf0e2cac2141bc46b30a33807149a5da Mon Sep 17 00:00:00 2001 From: fdai7801 Date: Fri, 9 Feb 2024 21:54:41 +0000 Subject: [PATCH 120/125] Update test_calculator.c --- src/test/c/test_calculator.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/test/c/test_calculator.c b/src/test/c/test_calculator.c index ba35300..2b0e3e3 100644 --- a/src/test/c/test_calculator.c +++ b/src/test/c/test_calculator.c @@ -209,5 +209,14 @@ void test_DecToBin(void) { // Assert TEST_ASSERT_EQUAL_INT64(100, result); } +void test_BinToDec(void) { + // Arrange + long long int result; + + // Act + result = DecToBin(100); + // Assert + TEST_ASSERT_EQUAL_INT64(8, result); +} From 8a87c2ece03c98c3643ae4871dd3bac5f9854aea Mon Sep 17 00:00:00 2001 From: fdai7801 Date: Fri, 9 Feb 2024 21:56:50 +0000 Subject: [PATCH 121/125] Update test_calculator.c --- src/test/c/test_calculator.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/test/c/test_calculator.c b/src/test/c/test_calculator.c index 2b0e3e3..370fcd4 100644 --- a/src/test/c/test_calculator.c +++ b/src/test/c/test_calculator.c @@ -219,4 +219,14 @@ void test_BinToDec(void) { // Assert TEST_ASSERT_EQUAL_INT64(8, result); } +void test_additionbin(void) { + // Arrange + long long int result; + + // Act + result = additionbin(1,1); + + // Assert + TEST_ASSERT_EQUAL_INT64(10, result); +} From 45396a2e0b28ff465c4ca6d95b218ff8883b7e1a Mon Sep 17 00:00:00 2001 From: fdai7801 Date: Fri, 9 Feb 2024 21:57:26 +0000 Subject: [PATCH 122/125] Update --- src/test/c/test_calculator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/c/test_calculator.c b/src/test/c/test_calculator.c index 370fcd4..89738cc 100644 --- a/src/test/c/test_calculator.c +++ b/src/test/c/test_calculator.c @@ -214,7 +214,7 @@ void test_BinToDec(void) { long long int result; // Act - result = DecToBin(100); + result = BinToDec(100); // Assert TEST_ASSERT_EQUAL_INT64(8, result); From 9a71acc2ecbbfb9dfdc7938fc62afcac17570763 Mon Sep 17 00:00:00 2001 From: fdai7801 Date: Fri, 9 Feb 2024 21:58:20 +0000 Subject: [PATCH 123/125] kabrel --- src/test/c/test_calculator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/c/test_calculator.c b/src/test/c/test_calculator.c index 89738cc..426ea9a 100644 --- a/src/test/c/test_calculator.c +++ b/src/test/c/test_calculator.c @@ -1,5 +1,5 @@ #include "unity.h" -#include "BasicMode" +#include "BasicMode.h" #include "main_calculator.h" #include "testForOperator.h" #include "testForNumber.h" From 40c8f7ff8faf3b0f3ad6285c346b14c9582dfb76 Mon Sep 17 00:00:00 2001 From: fdai7801 Date: Fri, 9 Feb 2024 22:00:24 +0000 Subject: [PATCH 124/125] Update test_calculator.c --- src/test/c/test_calculator.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/test/c/test_calculator.c b/src/test/c/test_calculator.c index 426ea9a..45970d5 100644 --- a/src/test/c/test_calculator.c +++ b/src/test/c/test_calculator.c @@ -229,4 +229,14 @@ void test_additionbin(void) { // Assert TEST_ASSERT_EQUAL_INT64(10, result); } +void test_multiplicationbin(void) { + // Arrange + long long int result; + + // Act + result = multiplicationbin(1,10); + + // Assert + TEST_ASSERT_EQUAL_INT64(10, result); +} From 169bb053e601da67076faa764093c15187a6cedc Mon Sep 17 00:00:00 2001 From: fdai7801 Date: Fri, 9 Feb 2024 22:02:11 +0000 Subject: [PATCH 125/125] Update kabrel --- src/test/c/test_calculator.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/test/c/test_calculator.c b/src/test/c/test_calculator.c index 45970d5..0ab10cf 100644 --- a/src/test/c/test_calculator.c +++ b/src/test/c/test_calculator.c @@ -239,4 +239,14 @@ void test_multiplicationbin(void) { // Assert TEST_ASSERT_EQUAL_INT64(10, result); } +void test_subtractionbin(void) { + // Arrange + long long int result; + + // Act + result = subtractionbin(100,10); + + // Assert + TEST_ASSERT_EQUAL_INT64(10, result); +}