From ea33f9ab8a61254e3446be91b65c8c112b4ef6cb Mon Sep 17 00:00:00 2001 From: amankhandelwaal Date: Sat, 19 Oct 2024 03:30:35 +0530 Subject: [PATCH 1/3] ongoing --- src/main.c | 660 ++++++++++++++++------------------------------------- 1 file changed, 197 insertions(+), 463 deletions(-) diff --git a/src/main.c b/src/main.c index 840abf5..06682d0 100644 --- a/src/main.c +++ b/src/main.c @@ -3,7 +3,8 @@ #include #include -typedef struct { +typedef struct +{ char name[50]; char email[50]; char mobile[10]; @@ -12,7 +13,8 @@ typedef struct { char movie_selected[50]; } Details; -typedef struct{ +typedef struct +{ char *movie_name; char seats[10][15][4]; } Theatre; @@ -24,7 +26,6 @@ int count = 0; Theatre one, two, three, four, five; - void PrintMenu() { printf("\033[1;36m"); @@ -65,6 +66,14 @@ void InputDetails() scanf("%s", dynamic_array[count].mobile); getchar(); + FILE *file = fopen("data.csv", "a"); + if (!file) + { + printf("Could not open file data.csv for writing.\n"); + return; + } + fprintf(file, "%s,%s,%s,%s,%d,%s\n", dynamic_array[count - 1].name, dynamic_array[count - 1].email, dynamic_array[count - 1].mobile, dynamic_array[count - 1].movie_selected, dynamic_array[count - 1].row, dynamic_array[count - 1].col); + count++; } @@ -73,48 +82,141 @@ void ShowDetails() printf(" >>> Enter first or last name: "); char search[50]; scanf("%s", search); - for (int i = 0; i < count; i++) { - if (strstr(dynamic_array[i].name, search) != NULL) { + for (int i = 0; i < count; i++) + { + if (strstr(dynamic_array[i].name, search) != NULL) + { printf(" Name: %s\n Mobile: %s\n Email: %s\n", dynamic_array[i].name, dynamic_array[i].mobile, dynamic_array[i].email); } } } -void ReadCSVAndUpdateSeats(const char *filename, Theatre *theatre, char *moviename) { +void ReadCSVAndUpdateSeats(const char *filename, Theatre *theatre, char *moviename) +{ FILE *file = fopen(filename, "r"); - if (!file) { + if (!file) + { printf("Could not open file %s for reading.\n", filename); return; } char line[256]; - while (fgets(line, sizeof(line), file)) { + while (fgets(line, sizeof(line), file)) + { char *token; char movie[50], row; int col; - token = strtok(line,","); - token = strtok(NULL,","); - token = strtok(NULL,","); + token = strtok(line, ","); token = strtok(NULL, ","); - if (token) strcpy(movie, token); token = strtok(NULL, ","); - if (token) row = token[0]; token = strtok(NULL, ","); - if (token) col = atoi(token); - if (strcmp(movie,moviename) == 0) { + if (token) + strcpy(movie, token); + if (strcmp(movie, moviename) != 0) + { + token = strtok(NULL, ","); + if (token) + row = token[0]; + token = strtok(NULL, ","); + if (token) + col = atoi(token); int row_index = row - 'A'; - if (row_index >= 0 && row_index < 10 && col >= 1 && col <= 15) { + if (row_index >= 0 && row_index < 10 && col >= 1 && col <= 15) + { strcpy(theatre->seats[row_index][col - 1], "[X]"); } } - } fclose(file); } + +void DisplaySeats(Theatre *theatre, char *movie_name) +{ + printf(" You have chosen the movie %s\n", movie_name); + printf(" Select a Seat!\n"); + + printf("\t\tRecliner $500\n"); + for (int i = 9; i > 8; i--) + { + printf("\033[38;5;250m\t\t%c ", 'A' + i); + printf("\033[0m"); + for (int j = 0; j < 15; j++) + { + if (strcmp(theatre->seats[i][j], "[ ]") == 0) + printf("\033[1;32m"); + else + printf("\033[1;31m"); + printf("%s ", theatre->seats[i][j]); + } + printf("\033[0m\n"); + } + + printf("\t\tPrime $300\n"); + for (int i = 8; i > 5; i--) + { + printf("\033[38;5;250m\t\t%c ", 'A' + i); + printf("\033[0m"); + for (int j = 0; j < 15; j++) + { + if (strcmp(theatre->seats[i][j], "[ ]") == 0) + printf("\033[1;32m"); + else + printf("\033[1;31m"); + printf("%s ", theatre->seats[i][j]); + } + printf("\033[0m\n"); + } + + printf("\t\tNormal $200\n"); + for (int i = 5; i >= 0; i--) + { + printf("\033[38;5;250m\t\t%c ", 'A' + i); + printf("\033[0m"); + for (int j = 0; j < 15; j++) + { + if (strcmp(theatre->seats[i][j], "[ ]") == 0) + printf("\033[1;32m"); + else + printf("\033[1;31m"); + printf("%s ", theatre->seats[i][j]); + } + printf("\033[0m\n"); + } + + printf("\t\t 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15\n\n"); +} + +void BookSeat(Theatre *theatre, char *booked_seat, Details *user) +{ + char row; + int num; + + printf(" >>> Enter the row you would like: "); + scanf(" %c", &row); + printf(" >>> Enter the seat number you would like (1-15): "); + scanf("%d", &num); + + int row_index = row - 'A'; + + if (strcmp(theatre->seats[row_index][num - 1], booked_seat) == 0) + { + printf(" Sorry, the seat %c%d is already booked.\n", row, num); + } + else + { + strcpy(theatre->seats[row_index][num - 1], booked_seat); + printf(" Seat %c%d successfully booked!\n", row, num); + user->row = malloc(sizeof(char)); + *(user->row) = row; + user->col = num; + } +} + void Book() { printf(" >>> Enter your first or last name: "); char search[50]; scanf("%s", search); + for (int i = 0; i < count; i++) { if (strstr(dynamic_array[i].name, search) != NULL) @@ -125,418 +227,43 @@ void Book() printf(" \t(3) Oppenheimer\n"); printf(" \t(4) Inception\n"); printf(" \t(5) Tenet\n"); - printf(" >>>"); + printf(" >>> "); int n; scanf("%d", &n); + + Theatre *selected_movie; char movie_chosen[50]; - int movie_num; - switch(n) + + switch (n) { - case 1: - strcpy(movie_chosen,"Dune 2"); - movie_num = 1; - break; - case 2: - strcpy(movie_chosen,"Transformers One"); - movie_num = 2; - break; - case 3: - strcpy(movie_chosen,"Oppenheimer"); - movie_num = 3; - break; - case 4: - strcpy(movie_chosen,"Inception"); - movie_num = 4; - break; - case 5: - strcpy(movie_chosen,"Tenet"); - movie_num = 5; - break; - default: - printf("Invalid"); - break; - } - switch (movie_num){ - case 1: - ReadCSVAndUpdateSeats("data.csv",&one,movie_chosen); - break; - case 2: - ReadCSVAndUpdateSeats("data.csv",&two,movie_chosen); - break; - case 3: - ReadCSVAndUpdateSeats("data.csv",&three,movie_chosen); - break; - case 4: - ReadCSVAndUpdateSeats("data.csv",&four,movie_chosen); - break; - case 5: - ReadCSVAndUpdateSeats("data.csv",&five,movie_chosen); - break; - default: - break; + case 1: + selected_movie = &one; + strcpy(movie_chosen, "Dune 2"); + break; + case 2: + selected_movie = &two; + strcpy(movie_chosen, "Transformers One"); + break; + case 3: + selected_movie = &three; + strcpy(movie_chosen, "Oppenheimer"); + break; + case 4: + selected_movie = &four; + strcpy(movie_chosen, "Inception"); + break; + case 5: + selected_movie = &five; + strcpy(movie_chosen, "Tenet"); + break; + default: + printf("Invalid choice\n"); + return; } - char s; - char *empty_seat = "[ ]"; - char *booked_seat = "[X]"; - if (n == 1) - { - strcpy(dynamic_array[i].movie_selected, "Dune 2"); - printf(" You have chosen the movie Dune 2\n"); - printf(" Select a Seat!\n"); - - printf("\t\tRecliner $500\n"); - for (int i = 9; i > 8; i--) - { - printf("\033[38;5;250m"); - printf("\t\t%c ",'A'+i); - printf("\033[0m"); - for (int j = 0; j < 15; j++) - { - if (strcmp(one.seats[i][j], empty_seat) == 0) - printf("\033[1;32m"); - else - printf("\033[1;31m"); - printf("%s ", one.seats[i][j]); - } - printf("\033[0m"); - printf("\n"); - } - printf("\t\tPrime $300\n"); - for (int i = 8; i > 5; i--) - { - printf("\033[38;5;250m"); - printf("\t\t%c ",'A'+i); - printf("\033[0m"); - for (int j = 0; j < 15; j++) - { - if (strcmp(one.seats[i][j], empty_seat) == 0) - printf("\033[1;32m"); - else - printf("\033[1;31m"); - printf("%s ", one.seats[i][j]); - } - printf("\033[0m"); - printf("\n"); - } - printf("\t\tNomral $200\n"); - for (int i = 5; i >= 0; i--) - { - printf("\033[38;5;250m"); - printf("\t\t%c ",'A'+i); - printf("\033[0m"); - for (int j = 0; j < 15; j++) - { - if (strcmp(one.seats[i][j], empty_seat) == 0) - printf("\033[1;32m"); - else - printf("\033[1;31m"); - printf("%s ", one.seats[i][j]); - } - printf("\033[0m"); - printf("\n"); - } - printf("\t\t 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15\n\n"); - printf(" >>> Enter the row you would like: "); - scanf(" %c", &s); - printf(" >>> Enter the seat number you would like (1-15)"); - int num; - scanf("%d", &num); - - int temp = s - 'A'; - strcpy(one.seats[temp][num - 1], booked_seat); - - dynamic_array[i].row = malloc(sizeof(char)); - *(dynamic_array[i].row) = s; - dynamic_array[i].col = num; - } - if (n == 2) - { - strcpy(dynamic_array[i].movie_selected, "Transformers One"); - printf(" You have chosen the movie Transformers One\n"); - printf(" Select a Seat!\n"); - - printf("\t\tRecliner $500\n"); - for (int i = 9; i > 8; i--) - { - printf("\033[38;5;250m"); - printf("\t\t%c ",'A'+i); - printf("\033[0m"); - for (int j = 0; j < 15; j++) - { - if (strcmp(two.seats[i][j], empty_seat) == 0) - printf("\033[1;32m"); - else - printf("\033[1;31m"); - printf("%s ", two.seats[i][j]); - } - printf("\033[0m"); - printf("\n"); - } - printf("\t\tPrime $300\n"); - for (int i = 8; i > 5; i--) - { - printf("\033[38;5;250m"); - printf("\t\t%c ",'A'+i); - printf("\033[0m"); - for (int j = 0; j < 15; j++) - { - if (strcmp(two.seats[i][j], empty_seat) == 0) - printf("\033[1;32m"); - else - printf("\033[1;31m"); - printf("%s ", two.seats[i][j]); - } - printf("\033[0m"); - printf("\n"); - } - printf("\t\tNomral $200\n"); - for (int i = 5; i >= 0; i--) - { - printf("\033[38;5;250m"); - printf("\t\t%c ",'A'+i); - printf("\033[0m"); - for (int j = 0; j < 15; j++) - { - if (strcmp(two.seats[i][j], empty_seat) == 0) - printf("\033[1;32m"); - else - printf("\033[1;31m"); - printf("%s ", two.seats[i][j]); - } - printf("\033[0m"); - printf("\n"); - } - printf("\t\t 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15\n\n"); - - printf(" >>> Enter the row you would like: "); - scanf(" %c", &s); - printf(" >>> Enter the seat number you would like (1-15)"); - int num; - scanf("%d", &num); - - int temp = s - 'A'; - strcpy(two.seats[temp][num - 1], booked_seat); - - dynamic_array[i].row = malloc(sizeof(char)); - *(dynamic_array[i].row) = s; - dynamic_array[i].col = num; - } - if (n == 3) - { - strcpy(dynamic_array[i].movie_selected, "Oppenheimer"); - printf(" You have chosen the movie Oppenheimer\n"); - printf(" Select a Seat!\n"); - - printf("\t\tRecliner $500\n"); - for (int i = 9; i > 8; i--) - { - printf("\033[38;5;250m"); - printf("\t\t%c ",'A'+i); - printf("\033[0m"); - for (int j = 0; j < 15; j++) - { - if (strcmp(three.seats[i][j], empty_seat) == 0) - printf("\033[1;32m"); - else - printf("\033[1;31m"); - printf("%s ", three.seats[i][j]); - } - printf("\033[0m"); - printf("\n"); - } - printf("\t\tPrime $300\n"); - for (int i = 8; i > 5; i--) - { - printf("\033[38;5;250m"); - printf("\t\t%c ",'A'+i); - printf("\033[0m"); - for (int j = 0; j < 15; j++) - { - if (strcmp(three.seats[i][j], empty_seat) == 0) - printf("\033[1;32m"); - else - printf("\033[1;31m"); - printf("%s ", three.seats[i][j]); - } - printf("\033[0m"); - printf("\n"); - } - printf("\t\tNomral $200\n"); - for (int i = 5; i >= 0; i--) - { - printf("\033[38;5;250m"); - printf("\t\t%c ",'A'+i); - printf("\033[0m"); - for (int j = 0; j < 15; j++) - { - if (strcmp(three.seats[i][j], empty_seat) == 0) - printf("\033[1;32m"); - else - printf("\033[1;31m"); - printf("%s ", three.seats[i][j]); - } - printf("\033[0m"); - printf("\n"); - } - printf("\t\t 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15\n\n"); - - printf(" >>> Enter the row you would like: "); - scanf(" %c", &s); - printf(" >>> Enter the seat number you would like (1-15)"); - int num; - scanf("%d", &num); - - int temp = s - 'A'; - strcpy(three.seats[temp][num - 1], booked_seat); - - dynamic_array[i].row = malloc(sizeof(char)); - *(dynamic_array[i].row) = s; - dynamic_array[i].col = num; - } - if (n == 4) - { - strcpy(dynamic_array[i].movie_selected, "Inception"); - printf(" You have chosen the movie Inception\n"); - printf(" Select a Seat!\n"); - - printf("\t\tRecliner $500\n"); - for (int i = 9; i > 8; i--) - { - printf("\033[38;5;250m"); - printf("\t\t%c ",'A'+i); - printf("\033[0m"); - for (int j = 0; j < 15; j++) - { - if (strcmp(four.seats[i][j], empty_seat) == 0) - printf("\033[1;32m"); - else - printf("\033[1;31m"); - printf("%s ", four.seats[i][j]); - } - printf("\033[0m"); - printf("\n"); - } - printf("\t\tPrime $300\n"); - for (int i = 8; i > 5; i--) - { - printf("\033[38;5;250m"); - printf("\t\t%c ",'A'+i); - printf("\033[0m"); - for (int j = 0; j < 15; j++) - { - if (strcmp(four.seats[i][j], empty_seat) == 0) - printf("\033[1;32m"); - else - printf("\033[1;31m"); - printf("%s ", four.seats[i][j]); - } - printf("\033[0m"); - printf("\n"); - } - printf("\t\tNomral $200\n"); - for (int i = 5; i >= 0; i--) - { - printf("\033[38;5;250m"); - printf("\t\t%c ",'A'+i); - printf("\033[0m"); - for (int j = 0; j < 15; j++) - { - if (strcmp(four.seats[i][j], empty_seat) == 0) - printf("\033[1;32m"); - else - printf("\033[1;31m"); - printf("%s ", four.seats[i][j]); - } - printf("\033[0m"); - printf("\n"); - } - printf("\t\t 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15\n\n"); - - printf(" >>> Enter the row you would like: "); - scanf(" %c", &s); - printf(" >>> Enter the seat number you would like (1-15)"); - int num; - scanf("%d", &num); - - int temp = s - 'A'; - strcpy(four.seats[temp][num - 1], booked_seat); - - dynamic_array[i].row = malloc(sizeof(char)); - *(dynamic_array[i].row) = s; - dynamic_array[i].col = num; - } - if (n == 5) - { - strcpy(dynamic_array[i].movie_selected, "Tenet"); - printf(" You have chosen the movie Tenet\n"); - printf(" Select a Seat!\n"); - - printf("\t\tRecliner $500\n"); - for (int i = 9; i > 8; i--) - { - printf("\033[38;5;250m"); - printf("\t\t%c ",'A'+i); - printf("\033[0m"); - for (int j = 0; j < 15; j++) - { - if (strcmp(five.seats[i][j], empty_seat) == 0) - printf("\033[1;32m"); - else - printf("\033[1;31m"); - printf("%s ", five.seats[i][j]); - } - printf("\033[0m"); - printf("\n"); - } - printf("\t\tPrime $300\n"); - for (int i = 8; i > 5; i--) - { - printf("\033[38;5;250m"); - printf("\t\t%c ",'A'+i); - printf("\033[0m"); - for (int j = 0; j < 15; j++) - { - if (strcmp(five.seats[i][j], empty_seat) == 0) - printf("\033[1;32m"); - else - printf("\033[1;31m"); - printf("%s ", five.seats[i][j]); - } - printf("\033[0m"); - printf("\n"); - } - printf("\t\tNomral $200\n"); - for (int i = 5; i >= 0; i--) - { - printf("\033[38;5;250m"); - printf("\t\t%c ",'A'+i); - printf("\033[0m"); - for (int j = 0; j < 15; j++) - { - if (strcmp(five.seats[i][j], empty_seat) == 0) - printf("\033[1;32m"); - else - printf("\033[1;31m"); - printf("%s ", five.seats[i][j]); - } - printf("\033[0m"); - printf("\n"); - } - printf("\t\t 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15\n\n"); - - printf(" >>> Enter the row you would like: "); - scanf(" %c", &s); - printf(" >>> Enter the seat number you would like (1-15)"); - int num; - scanf("%d", &num); - - int temp = s - 'A'; - strcpy(five.seats[temp][num - 1], booked_seat); - - dynamic_array[i].row = malloc(sizeof(char)); - *(dynamic_array[i].row) = s; - dynamic_array[i].col = num; - } + strcpy(dynamic_array[i].movie_selected, movie_chosen); + ReadCSVAndUpdateSeats("data.csv", selected_movie, movie_chosen); + DisplaySeats(selected_movie, movie_chosen); + BookSeat(selected_movie, "[X]", &dynamic_array[i]); } } } @@ -547,7 +274,8 @@ void GenerateBill() char search[50]; scanf("%s", search); printf("\033[0;31m"); - for (int i = 0; i < count; i++) { + for (int i = 0; i < count; i++) + { if (strstr(dynamic_array[i].name, search) != NULL) { printf("\n\n\t\t *************************************\n"); @@ -561,9 +289,9 @@ void GenerateBill() printf("\t\t * %s", asctime(localTime)); printf("\t\t * Movie Selected: %s\n", dynamic_array[i].movie_selected); printf("\t\t * Seat : %c-%d\n", *(dynamic_array[i].row), dynamic_array[i].col); - if ('A'<=*(dynamic_array[i].row) && *(dynamic_array[i].row)<='F') + if ('A' <= *(dynamic_array[i].row) && *(dynamic_array[i].row) <= 'F') printf("\t\t * Price = $200\n"); - else if('G'<=*(dynamic_array[i].row) && *(dynamic_array[i].row)<='I') + else if ('G' <= *(dynamic_array[i].row) && *(dynamic_array[i].row) <= 'I') printf("\t\t * Price = $300\n"); else if (*(dynamic_array[i].row) == 'J') printf("\t\t * Price = $500\n"); @@ -602,41 +330,47 @@ int main() } dynamic_array = malloc(sizeof(Details)); - if (dynamic_array == NULL) - { - printf("Memory allocation failed!\n"); - } - - int flag = 0; - while (flag != 1) - { - PrintMenu(); - int n; - scanf("%d", &n); - switch (n) - { - case 1: - InputDetails(); - break; - case 2: - ShowDetails(); - break; - case 3: - Book(); - break; - case 4: - GenerateBill(); - break; - case 5: - flag = 1; - break; - default: - printf("Invalid entry!!!\n"); - break; - } - } - - free(dynamic_array); - return 0; + if (dynamic_array == NULL) + { + printf("Memory allocation failed!\n"); + return 1; + } + + int flag = 0; + while (flag != 1) + { + PrintMenu(); + int n; + scanf("%d", &n); + switch (n) + { + case 1: + InputDetails(); + break; + case 2: + ShowDetails(); + break; + case 3: + Book(); + break; + case 4: + GenerateBill(); + break; + case 5: + flag = 1; + break; + default: + printf("Invalid entry!!!\n"); + break; + } + } + + free(dynamic_array); + free(one.movie_name); + free(two.movie_name); + free(three.movie_name); + free(four.movie_name); + free(five.movie_name); + return 0; } From e0425464ead08d77716eee40d3c810d430d7848e Mon Sep 17 00:00:00 2001 From: amankhandelwaal Date: Sat, 19 Oct 2024 03:44:54 +0530 Subject: [PATCH 2/3] updated --- src/data.csv | 4 ++ src/main.c | 181 +++++++++++++++++++++++++-------------------------- src/main.exe | Bin 0 -> 50062 bytes 3 files changed, 92 insertions(+), 93 deletions(-) create mode 100644 src/main.exe diff --git a/src/data.csv b/src/data.csv index 27128dd..b04909f 100644 --- a/src/data.csv +++ b/src/data.csv @@ -71,3 +71,7 @@ Hannah Baker, hannahbaker@gmail.com,Oppenheimer,J,10 Sophia King, sophiaking@gmail.com,Dune 2,D,9 James Garcia, jamesgarcia@gmail.com,Transformers One,J,1 Stella Wright, stellawright@gmail.com,Oppenheimer +aman,aman@123,12345,None,-,0 +aman,aman@123,12345,Oppenheimer,J,3 +aman,amanaman@amanaman,1234,None,-,0 +aman,amanaman@amanaman,1234,Dune 2,I,1 diff --git a/src/main.c b/src/main.c index 06682d0..61bdf11 100644 --- a/src/main.c +++ b/src/main.c @@ -8,7 +8,7 @@ typedef struct char name[50]; char email[50]; char mobile[10]; - char *row; + char row; int col; char movie_selected[50]; } Details; @@ -20,7 +20,6 @@ typedef struct } Theatre; Theatre *list = NULL; - Details *dynamic_array = NULL; int count = 0; @@ -59,7 +58,7 @@ void InputDetails() printf(" >>> Enter your name: "); scanf(" %[^\n]", dynamic_array[count].name); getchar(); - printf(" >>> Enter your email address:"); + printf(" >>> Enter your email address: "); scanf("%s", dynamic_array[count].email); getchar(); printf(" >>> Enter mobile number: "); @@ -72,7 +71,10 @@ void InputDetails() printf("Could not open file data.csv for writing.\n"); return; } - fprintf(file, "%s,%s,%s,%s,%d,%s\n", dynamic_array[count - 1].name, dynamic_array[count - 1].email, dynamic_array[count - 1].mobile, dynamic_array[count - 1].movie_selected, dynamic_array[count - 1].row, dynamic_array[count - 1].col); + + // Write user details to the CSV with placeholders for movie selection and seat information + fprintf(file, "%s,%s,%s,%s,%c,%d\n", dynamic_array[count].name, dynamic_array[count].email, dynamic_array[count].mobile, "None", '-', 0); + fclose(file); count++; } @@ -82,14 +84,23 @@ void ShowDetails() printf(" >>> Enter first or last name: "); char search[50]; scanf("%s", search); + int found = 0; for (int i = 0; i < count; i++) { if (strstr(dynamic_array[i].name, search) != NULL) { - printf(" Name: %s\n Mobile: %s\n Email: %s\n", dynamic_array[i].name, dynamic_array[i].mobile, dynamic_array[i].email); + printf(" Name: %s\n Mobile: %s\n Email: %s\n Movie: %s\n Seat: %c-%d\n", + dynamic_array[i].name, dynamic_array[i].mobile, dynamic_array[i].email, + dynamic_array[i].movie_selected, dynamic_array[i].row, dynamic_array[i].col); + found = 1; } } + if (!found) + { + printf(" No details found\n"); + } } + void ReadCSVAndUpdateSeats(const char *filename, Theatre *theatre, char *moviename) { FILE *file = fopen(filename, "r"); @@ -102,23 +113,11 @@ void ReadCSVAndUpdateSeats(const char *filename, Theatre *theatre, char *moviena char line[256]; while (fgets(line, sizeof(line), file)) { - char *token; char movie[50], row; int col; - token = strtok(line, ","); - token = strtok(NULL, ","); - token = strtok(NULL, ","); - token = strtok(NULL, ","); - if (token) - strcpy(movie, token); - if (strcmp(movie, moviename) != 0) + sscanf(line, "%*[^,],%*[^,],%*[^,],%[^,],%c,%d", movie, &row, &col); + if (strcmp(movie, moviename) == 0 && row != '-' && col != 0) { - token = strtok(NULL, ","); - if (token) - row = token[0]; - token = strtok(NULL, ","); - if (token) - col = atoi(token); int row_index = row - 'A'; if (row_index >= 0 && row_index < 10 && col >= 1 && col <= 15) { @@ -205,9 +204,16 @@ void BookSeat(Theatre *theatre, char *booked_seat, Details *user) { strcpy(theatre->seats[row_index][num - 1], booked_seat); printf(" Seat %c%d successfully booked!\n", row, num); - user->row = malloc(sizeof(char)); - *(user->row) = row; + user->row = row; user->col = num; + + // Update CSV with movie and seat details + FILE *file = fopen("data.csv", "a"); + if (file) + { + fprintf(file, "%s,%s,%s,%s,%c,%d\n", user->name, user->email, user->mobile, user->movie_selected, user->row, user->col); + fclose(file); + } } } @@ -221,49 +227,50 @@ void Book() { if (strstr(dynamic_array[i].name, search) != NULL) { - printf(" Which Movie would you like to watch:\n"); - printf(" \t(1) Dune 2\n"); - printf(" \t(2) Transformers One\n"); - printf(" \t(3) Oppenheimer\n"); - printf(" \t(4) Inception\n"); - printf(" \t(5) Tenet\n"); - printf(" >>> "); - int n; - scanf("%d", &n); - - Theatre *selected_movie; - char movie_chosen[50]; - - switch (n) + printf(" Which Movie would you like to book?\n"); + printf(" (1) %s\n", one.movie_name); + printf(" (2) %s\n", two.movie_name); + printf(" (3) %s\n", three.movie_name); + printf(" (4) %s\n", four.movie_name); + printf(" (5) %s\n", five.movie_name); + + int option; + scanf("%d", &option); + + Theatre *theatre = NULL; + char *selected_movie = NULL; + + switch (option) { case 1: - selected_movie = &one; - strcpy(movie_chosen, "Dune 2"); + theatre = &one; + selected_movie = one.movie_name; break; case 2: - selected_movie = &two; - strcpy(movie_chosen, "Transformers One"); + theatre = &two; + selected_movie = two.movie_name; break; case 3: - selected_movie = &three; - strcpy(movie_chosen, "Oppenheimer"); + theatre = &three; + selected_movie = three.movie_name; break; case 4: - selected_movie = &four; - strcpy(movie_chosen, "Inception"); + theatre = &four; + selected_movie = four.movie_name; break; case 5: - selected_movie = &five; - strcpy(movie_chosen, "Tenet"); + theatre = &five; + selected_movie = five.movie_name; break; default: - printf("Invalid choice\n"); + printf(" Invalid option.\n"); return; } - strcpy(dynamic_array[i].movie_selected, movie_chosen); - ReadCSVAndUpdateSeats("data.csv", selected_movie, movie_chosen); - DisplaySeats(selected_movie, movie_chosen); - BookSeat(selected_movie, "[X]", &dynamic_array[i]); + + strcpy(dynamic_array[i].movie_selected, selected_movie); + ReadCSVAndUpdateSeats("data.csv", theatre, selected_movie); + DisplaySeats(theatre, selected_movie); + BookSeat(theatre, "[X]", &dynamic_array[i]); } } } @@ -273,76 +280,70 @@ void GenerateBill() printf(" >>> Enter first or last name: "); char search[50]; scanf("%s", search); + int found = 0; printf("\033[0;31m"); for (int i = 0; i < count; i++) { if (strstr(dynamic_array[i].name, search) != NULL) { + found = 1; printf("\n\n\t\t *************************************\n"); printf("\t\t * Name : %s\n", dynamic_array[i].name); printf("\t\t * Email id : %s\n", dynamic_array[i].email); printf("\t\t * Mobile No : %s\n", dynamic_array[i].mobile); + time_t currentTime; struct tm *localTime; currentTime = time(NULL); localTime = localtime(¤tTime); - printf("\t\t * %s", asctime(localTime)); + printf("\t\t * %s", asctime(localTime)); + printf("\t\t * Movie Selected: %s\n", dynamic_array[i].movie_selected); - printf("\t\t * Seat : %c-%d\n", *(dynamic_array[i].row), dynamic_array[i].col); - if ('A' <= *(dynamic_array[i].row) && *(dynamic_array[i].row) <= 'F') + printf("\t\t * Seat : %c-%d\n", dynamic_array[i].row, dynamic_array[i].col); + + if ('A' <= dynamic_array[i].row && dynamic_array[i].row <= 'F') printf("\t\t * Price = $200\n"); - else if ('G' <= *(dynamic_array[i].row) && *(dynamic_array[i].row) <= 'I') + else if ('G' <= dynamic_array[i].row && dynamic_array[i].row <= 'I') printf("\t\t * Price = $300\n"); - else if (*(dynamic_array[i].row) == 'J') + else if (dynamic_array[i].row == 'J') printf("\t\t * Price = $500\n"); + printf("\t\t *************************************\n\n"); } } + if (!found) + { + printf("\t\t No matching customer found.\n"); + } printf("\033[0m"); } int main() { - one.movie_name = malloc(strlen("Dune 2") + 1); - strcpy(one.movie_name, "Dune 2"); - two.movie_name = malloc(strlen("Transformers One") + 1); - strcpy(two.movie_name, "Transformers One"); - three.movie_name = malloc(strlen("Oppenheimer") + 1); - strcpy(three.movie_name, "Oppenheimer"); - four.movie_name = malloc(strlen("Inception") + 1); - strcpy(four.movie_name, "Inception"); - five.movie_name = malloc(strlen("Tenet") + 1); - strcpy(five.movie_name, "Tenet"); - - char *empty_seat = "[ ]"; - char *booked_seat = "[X]"; + one.movie_name = "Dune 2"; + two.movie_name = "Transformers One"; + three.movie_name = "Oppenheimer"; + four.movie_name = "Inception"; + five.movie_name = "Tenet"; for (int i = 0; i < 10; i++) { for (int j = 0; j < 15; j++) { - strcpy(one.seats[i][j], empty_seat); - strcpy(two.seats[i][j], empty_seat); - strcpy(three.seats[i][j], empty_seat); - strcpy(four.seats[i][j], empty_seat); - strcpy(five.seats[i][j], empty_seat); + strcpy(one.seats[i][j], "[ ]"); + strcpy(two.seats[i][j], "[ ]"); + strcpy(three.seats[i][j], "[ ]"); + strcpy(four.seats[i][j], "[ ]"); + strcpy(five.seats[i][j], "[ ]"); } } - dynamic_array = malloc(sizeof(Details)); - if (dynamic_array == NULL) - { - printf("Memory allocation failed!\n"); - return 1; - } - - int flag = 0; - while (flag != 1) + int choice = 0; + while (choice != 5) { PrintMenu(); - int n; - scanf("%d", &n); - switch (n) + scanf("%d", &choice); + switch (choice) { case 1: InputDetails(); @@ -357,20 +358,14 @@ int main() GenerateBill(); break; case 5: - flag = 1; + printf("Bye!\n"); break; default: - printf("Invalid entry!!!\n"); + printf("Invalid choice, please select again.\n"); break; } } free(dynamic_array); - free(one.movie_name); - free(two.movie_name); - free(three.movie_name); - free(four.movie_name); - free(five.movie_name); - return 0; } diff --git a/src/main.exe b/src/main.exe new file mode 100644 index 0000000000000000000000000000000000000000..cc0b379294398a700cb07c09d1acc7437790914b GIT binary patch literal 50062 zcmeIb3w%`7wLiY+5i%qplR!|asDlj(6hgvF(4d(llZWJG9y|mb@|ciFUd^20p(3G^ zSWc(0vBlQ*>aQTSm)mPC?d3+QmIi_eDr&S;QK&_wI%CkLipaw{zwg@noH=tc34MI- z=l}WlcRg@&_Fj9fwbxpE?X~yW=bSx-w|6lUW6X>*7-Vc8u5@JZznA{ghT`~Zo{DFC z$G$japP}HzDdlzbZd*%h^V-(RMq71dQ&Y2Kt8&>|Jx#XyCR=uKnXR$8#+5Q|TuidU zy2Qa)fnglm_J{Fn+5L=NX=Lmqi#Eg>jFVY9kZPzBz{ca6fU^WANk?hmlH3NIbmfN) zIb^EtF>t*Yvk6=xAQ~LXMP#}d^N$h9f99`w4`Y)?AYAhR>LI~KIZ`CoMhRuvH{lNn zM7oBQKpMvyR-fC2MfPW-JqD*a5tZ+4BV8 zNDQtmI0>Klh8={LQss6NXcd*WQ7ZCiV{3X+>P5ZWhF!q1;9RB0~fmJ^iQY6lXe zM-9%fgX2jJyj~l@_uwSFTFPh#;muAHiYz2>4^G0X!x?sDu#C*va~5$(kPJA0^J<)T za!}|`2204CJui*tXH%OE;Us?BI4Jao66fV||BM_-SJDGcCzd1P;S$`c& z>OE($w&y{w4j{b`Xy@MRNcyxM@1e;D&8$nwFWwF|QvTxa6SsC57>mD$r04Z8rsOjI z2`bZ{BiGR*b)z;a2oCHE;uzfB*^OMdES&5F3=CO3FA_g$6NSv*ivms=SO;?XZ09rA z6aC_=xLOr}g-Jl_`5zFhq!m!9eI6m0x!#Hdfv*D8rPx4)SrtCvHRpp5(5N>5IJldT z;!j_Q8Wl`l<26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oX|8Nq4t-RKC;YwjSnCD(_~HML(3i5JPfnN z@OD+!zc5pZ{C#(YHiAa1qN%pk_aEWMYG2@WuT^&FR|tmnP2KS0_B5-b&m{+Z{k&XN zQki}7O8?f>Wt1PiS4Z)BY8G7}rS0Kdt$cq}F+*tlWB1 zudZ9?me%2Gcu1^9zjdzGCRYPCNvZ@eyeEgbz4Dk;4e^?vgikTJJfUCF;2sLwVnm44 zg` Date: Sat, 19 Oct 2024 05:36:18 +0530 Subject: [PATCH 3/3] fixed --- src/data.csv | 9 +++-- src/main.c | 97 +++++++++++++++++++++++++++++++++------------------ src/main.exe | Bin 50062 -> 50773 bytes 3 files changed, 67 insertions(+), 39 deletions(-) diff --git a/src/data.csv b/src/data.csv index b04909f..0a8cf69 100644 --- a/src/data.csv +++ b/src/data.csv @@ -1,4 +1,6 @@ -Sophia Anderson, sophiaanderson@gmail.com,9807654350,Transformers One,A,5 +ppeppapig,peppa@pig.piggy,3333,Inception,J,1 +A,1 +0,Transformers One,A,5 Mason Allen, masonallen@gmail.com,9807654370,Inception,A,7 Benjamin Davis, benjamindavis@gmail.com,9807654360,Oppenheimer,A,4 Ethan Ramirez, ethanramirez@gmail.com,9807654340,Dune 2,A,7 @@ -71,7 +73,4 @@ Hannah Baker, hannahbaker@gmail.com,Oppenheimer,J,10 Sophia King, sophiaking@gmail.com,Dune 2,D,9 James Garcia, jamesgarcia@gmail.com,Transformers One,J,1 Stella Wright, stellawright@gmail.com,Oppenheimer -aman,aman@123,12345,None,-,0 -aman,aman@123,12345,Oppenheimer,J,3 -aman,amanaman@amanaman,1234,None,-,0 -aman,amanaman@amanaman,1234,Dune 2,I,1 +hmm,hmm@hmm,222,Dune 2,A,1 diff --git a/src/main.c b/src/main.c index 61bdf11..365c1f9 100644 --- a/src/main.c +++ b/src/main.c @@ -72,7 +72,6 @@ void InputDetails() return; } - // Write user details to the CSV with placeholders for movie selection and seat information fprintf(file, "%s,%s,%s,%s,%c,%d\n", dynamic_array[count].name, dynamic_array[count].email, dynamic_array[count].mobile, "None", '-', 0); fclose(file); @@ -184,6 +183,39 @@ void DisplaySeats(Theatre *theatre, char *movie_name) printf("\t\t 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15\n\n"); } +void UpdateCSV(Details *user) +{ + FILE *file = fopen("data.csv", "r+"); + if (!file) + { + printf("Could not open file data.csv for updating.\n"); + return; + } + + char line[256]; + long pos = -1; + while (fgets(line, sizeof(line), file)) + { + if (strstr(line, user->name) != NULL) + { + pos = ftell(file) - strlen(line); + break; + } + } + + if (pos != -1) + { + fseek(file, pos, SEEK_SET); + fprintf(file, "%s,%s,%s,%s,%c,%d\n", user->name, user->email, user->mobile, user->movie_selected, user->row, user->col); + } + else + { + printf(" Could not find user in data.csv\n"); + } + + fclose(file); +} + void BookSeat(Theatre *theatre, char *booked_seat, Details *user) { char row; @@ -196,24 +228,18 @@ void BookSeat(Theatre *theatre, char *booked_seat, Details *user) int row_index = row - 'A'; - if (strcmp(theatre->seats[row_index][num - 1], booked_seat) == 0) + if (strcmp(theatre->seats[row_index][num - 1], "[X]") == 0) { printf(" Sorry, the seat %c%d is already booked.\n", row, num); } else { - strcpy(theatre->seats[row_index][num - 1], booked_seat); + strcpy(theatre->seats[row_index][num - 1], "[X]"); printf(" Seat %c%d successfully booked!\n", row, num); user->row = row; user->col = num; - - // Update CSV with movie and seat details - FILE *file = fopen("data.csv", "a"); - if (file) - { - fprintf(file, "%s,%s,%s,%s,%c,%d\n", user->name, user->email, user->mobile, user->movie_selected, user->row, user->col); - fclose(file); - } + strcpy(user->movie_selected, theatre->movie_name); + UpdateCSV(user); } } @@ -286,29 +312,32 @@ void GenerateBill() { if (strstr(dynamic_array[i].name, search) != NULL) { - found = 1; - printf("\n\n\t\t *************************************\n"); - printf("\t\t * Name : %s\n", dynamic_array[i].name); - printf("\t\t * Email id : %s\n", dynamic_array[i].email); - printf("\t\t * Mobile No : %s\n", dynamic_array[i].mobile); - - time_t currentTime; - struct tm *localTime; - currentTime = time(NULL); - localTime = localtime(¤tTime); - printf("\t\t * %s", asctime(localTime)); - - printf("\t\t * Movie Selected: %s\n", dynamic_array[i].movie_selected); - printf("\t\t * Seat : %c-%d\n", dynamic_array[i].row, dynamic_array[i].col); - - if ('A' <= dynamic_array[i].row && dynamic_array[i].row <= 'F') - printf("\t\t * Price = $200\n"); - else if ('G' <= dynamic_array[i].row && dynamic_array[i].row <= 'I') - printf("\t\t * Price = $300\n"); - else if (dynamic_array[i].row == 'J') - printf("\t\t * Price = $500\n"); - - printf("\t\t *************************************\n\n"); + if (!found) + { + found = 1; + printf("\n\n\t\t *************************************\n"); + printf("\t\t * Name : %s\n", dynamic_array[i].name); + printf("\t\t * Email id : %s\n", dynamic_array[i].email); + printf("\t\t * Mobile No : %s\n", dynamic_array[i].mobile); + + time_t currentTime; + struct tm *localTime; + currentTime = time(NULL); + localTime = localtime(¤tTime); + printf("\t\t * %s", asctime(localTime)); + + printf("\t\t * Movie Selected: %s\n", dynamic_array[i].movie_selected); + printf("\t\t * Seat : %c-%d\n", dynamic_array[i].row, dynamic_array[i].col); + + if ('A' <= dynamic_array[i].row && dynamic_array[i].row <= 'F') + printf("\t\t * Price = $200\n"); + else if ('G' <= dynamic_array[i].row && dynamic_array[i].row <= 'I') + printf("\t\t * Price = $300\n"); + else if (dynamic_array[i].row == 'J') + printf("\t\t * Price = $500\n"); + + printf("\t\t *************************************\n\n"); + } } } if (!found) diff --git a/src/main.exe b/src/main.exe index cc0b379294398a700cb07c09d1acc7437790914b..d68fd83634839a1cd4850ce933788d60733f49bf 100644 GIT binary patch delta 10590 zcmcgydt8)N`akbG!%Z$TA}Aukz>GH(928KIYP_IUYUUL$HC_OrMIacGwaaKD86pZk z-tvl9c_00QmoQLAZ%#3}b#%442 z2{7kP+$zHr3wq~QgW$HU)9Jft0J_>J&v#JYMM!u>lk*kuDxyrziQ{R9@1*`uq3LK& zZ>n~5L}4^MTvvDt{na?tJ-_bulRbw zTt|nV6SEBJGuV8Gw!Bfd;T5QRV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