From c5309df2e44cb52f204b2ce83faf48daa72cf7ff Mon Sep 17 00:00:00 2001 From: Pedro Lopes Date: Tue, 24 Oct 2023 08:43:23 -0300 Subject: [PATCH] add: TP02Q02 solved --- .../tp02/TP02Q02 - Classe em C/Player | Bin 0 -> 18440 bytes .../tp02/TP02Q02 - Classe em C/Player.c | 357 ++++++++++++++++++ .../tp02/TP02Q02 - Classe em C/pedro.out | 40 ++ .../tp02/TP02Q02 - Classe em C/pub.in | 41 ++ .../tp02/TP02Q02 - Classe em C/pub.out | 40 ++ 5 files changed, 478 insertions(+) create mode 100644 tps/gabaritos/tp02/TP02Q02 - Classe em C/Player create mode 100644 tps/gabaritos/tp02/TP02Q02 - Classe em C/Player.c create mode 100644 tps/gabaritos/tp02/TP02Q02 - Classe em C/pedro.out create mode 100644 tps/gabaritos/tp02/TP02Q02 - Classe em C/pub.in create mode 100644 tps/gabaritos/tp02/TP02Q02 - Classe em C/pub.out diff --git a/tps/gabaritos/tp02/TP02Q02 - Classe em C/Player b/tps/gabaritos/tp02/TP02Q02 - Classe em C/Player new file mode 100644 index 0000000000000000000000000000000000000000..a6885bab02be582361864adae38fdfcccca22512 GIT binary patch literal 18440 zcmeHPdvILUc|W_0Y{d^rfDOVtd;vSifMwYQV;;sUS!-Vx$q3s56KpSQ?MhmZb~XDj zvU${r4E1F#5UFVu1{#-Sh?6)S(o8%~8bAiuG8rZ@v}HtIRT!sT#l}&

~pKf8ROh z+r4|Wt907V^dB9~?svZ5_c-T%=W)-TdyoFY*Raa%atTfzal0VSd%i-vTCkfl;Jsp* zn2zr&#N}cN`12%&uL88)t#GELiWMGEvfHoaPI{TvW6CuoN_NH4kS>6!s8E_@S3+6M zJLv~Al^#=;XUj8`TsY`)=~M`&b~}nqdZDsQFVCj~`npAgB7vmqMKIZoX}d9P$8?w~ zgv6BNNim_%5$)GW>&Xa-Dd|#b`b{E8`Mm~lz-MC`oM}|x<;x4`6C@lq|ePjbT&RDSJ(ALwVBoVsNp|33w8;Nwi|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oKdd({ KraBB9toSegM}l$y literal 0 HcmV?d00001 diff --git a/tps/gabaritos/tp02/TP02Q02 - Classe em C/Player.c b/tps/gabaritos/tp02/TP02Q02 - Classe em C/Player.c new file mode 100644 index 0000000..530464f --- /dev/null +++ b/tps/gabaritos/tp02/TP02Q02 - Classe em C/Player.c @@ -0,0 +1,357 @@ +/** + * @path TP02Q02 - Classe em C/Player.c + * @description C file that implements the Player class. + * @author Pedro Lopes - github.com/httpspedroh + * @version 1.0 + * @update 2023-09-27 + */ + +// ---------------------------------------------------------------------------------------------------- // + +// Includes +#include +#include +#include +#include + +// ---------------------------------------------------------------------------------------------------- // + +// Constants +#define MAX_PLAYERS 4000 +#define FILE_PATH "/tmp/players.csv" + +#define MAX_NAME_SIZE 40 +#define MAX_COLLEGE_SIZE 60 +#define MAX_BIRTH_CITY_SIZE 40 +#define MAX_BIRTH_STATE_SIZE 40 + +#define MAX_LINE_SIZE 300 +#define MAX_ATTRIBUTE_SIZE 100 + +// ---------------------------------------------------------------------------------------------------- // + +// Structs +typedef struct Player { + int id; + char *name; + int height; + int weight; + int birthYear; + char *birthCity; + char *birthState; + char *college; +} Player; + +// ---------------------------------------------------------------------------------------------------- // + +// Global variables +Player players[MAX_PLAYERS]; +int playersLength = 0; + +// ---------------------------------------------------------------------------------------------------- // + +// Functions +bool isEnd(char* line) { return line[0] == 'F' && line[1] == 'I' && line[2] == 'M'; } + +void substring(char *string, char *stringStart, int length) { + + strncpy(string, stringStart, length); + string[length] = '\0'; +} + +void proccess_attribute(char *attribute, char **substringStart, char **substringEnd, bool isFirstAttribute) { + + // Skip first comma + if(!isFirstAttribute) { + + if(*substringEnd != NULL) *substringStart = *substringEnd + 1; + else *substringStart = *substringEnd; + } + + // Get next comma + *substringEnd = strchr(*substringStart, ','); + + // Get substring + if(*substringEnd) substring(attribute, *substringStart, *substringEnd - *substringStart); + else strcpy(attribute, *substringStart); + + // Set default value if attribute is empty + if(strcmp(attribute, "") == 0 || attribute[0] == '\n' || attribute[0] == '\r' || attribute[0] == '\0') strcpy(attribute, "nao informado"); + + // Clean \n from the end of the string + if(attribute[strlen(attribute) - 1] == '\n') attribute[strlen(attribute) - 1] = '\0'; +} + +// ---------------------------------------------------------------------------------------------------- // + +// Methods signatures + +// Class +Player player_newBlank(); +Player player_new(int id, char *name, int height, int weight, int birthYear, char *birthCity, char *birthState, char *college); +Player *player_clone(Player *player); +void player_print(Player *player); +Player player_read(char *line); +Player *player_searchById(int id); + +// Gets +int player_getId(Player *player); +char *player_getName(Player *player); +int player_getHeight(Player *player); +int player_getWeight(Player *player); +char *player_getCollege(Player *player); +int player_getBirthYear(Player *player); +char *player_getBirthCity(Player *player); +char *player_getBirthState(Player *player); + +// Sets +void player_setId(Player *player, int id); +void player_setName(Player *player, char *name); +void player_setHeight(Player *player, int height); +void player_setWeight(Player *player, int weight); +void player_setCollege(Player *player, char *college); +void player_setBirthYear(Player *player, int birthYear); +void player_setBirthCity(Player *player, char *birthCity); +void player_setBirthState(Player *player, char *birthState); + +// General +void startPlayers(); + +// ---------------------------------------------------------------------------------------------------- // + +// Methods implementations + +// Class +Player player_newBlank() { + + Player player; + + player.id = -1; + player.height = -1; + player.weight = -1; + player.birthYear = -1; + + player.name = (char *) calloc(MAX_NAME_SIZE, sizeof(char)); + strcpy(player.name, ""); + + player.birthCity = (char *) calloc(MAX_BIRTH_CITY_SIZE, sizeof(char)); + strcpy(player.birthCity, ""); + + player.birthState = (char *) calloc(MAX_BIRTH_STATE_SIZE, sizeof(char)); + strcpy(player.birthState, ""); + + player.college = (char *) calloc(MAX_COLLEGE_SIZE, sizeof(char)); + strcpy(player.college, ""); + + return player; +} + +Player player_new(int id, char *name, int height, int weight, int birthYear, char *birthCity, char *birthState, char *college) { + + Player player; + + player.id = id; + player.height = height; + player.weight = weight; + player.birthYear = birthYear; + + player.name = (char *) calloc(MAX_NAME_SIZE, sizeof(char)); + strcpy(player.name, name); + + player.birthCity = (char *) calloc(MAX_BIRTH_CITY_SIZE, sizeof(char)); + strcpy(player.birthCity, birthCity); + + player.birthState = (char *) calloc(MAX_BIRTH_STATE_SIZE, sizeof(char)); + strcpy(player.birthState, birthState); + + player.college = (char *) calloc(MAX_COLLEGE_SIZE, sizeof(char)); + strcpy(player.college, college); + + return player; +} + +Player *player_clone(Player *player) { + + Player *clone = (Player *) malloc(sizeof(Player)); + + clone -> id = player -> id; + clone -> height = player -> height; + clone -> weight = player -> weight; + + clone -> name = (char *) calloc(MAX_NAME_SIZE, sizeof(char)); + strcpy(clone -> name, player -> name); + + clone -> birthCity = (char *) calloc(MAX_BIRTH_CITY_SIZE, sizeof(char)); + strcpy(clone -> birthCity, player -> birthCity); + + clone -> birthState = (char *) calloc(MAX_BIRTH_STATE_SIZE, sizeof(char)); + strcpy(clone -> birthState, player -> birthState); + + clone -> college = (char *) calloc(MAX_COLLEGE_SIZE, sizeof(char)); + strcpy(clone -> college, player -> college); + + return clone; +} + +void player_print(Player *player) { + + printf("[%d ## %s ## %d ## %d ## %d ## %s ## %s ## %s]\n", + player -> id, + player -> name, + player -> height, + player -> weight, + player -> birthYear, + player -> college, + player -> birthCity, + player -> birthState + ); +} + +Player player_read(char *line) { + + Player player = player_newBlank(); + + char *substringStart = line; + char *substringEnd = NULL; + char attribute[MAX_ATTRIBUTE_SIZE]; + + // Get id + proccess_attribute(attribute, &substringStart, &substringEnd, true); + player_setId(&player, atoi(attribute)); + + // Get name + proccess_attribute(attribute, &substringStart, &substringEnd, false); + player_setName(&player, attribute); + + // Get height + proccess_attribute(attribute, &substringStart, &substringEnd, false); + player_setHeight(&player, atoi(attribute)); + + // Get weight + proccess_attribute(attribute, &substringStart, &substringEnd, false); + player_setWeight(&player, atoi(attribute)); + + // Get college + proccess_attribute(attribute, &substringStart, &substringEnd, false); + player_setCollege(&player, attribute); + + // Get birth year + proccess_attribute(attribute, &substringStart, &substringEnd, false); + player_setBirthYear(&player, atoi(attribute)); + + // Get birth city + proccess_attribute(attribute, &substringStart, &substringEnd, false); + player_setBirthCity(&player, attribute); + + // Get birth state + proccess_attribute(attribute, &substringStart, &substringEnd, false); + player_setBirthState(&player, attribute); + + return player; +} + +Player *player_searchById(int id) { + + for(int i = 0; i < playersLength; i++) { + + if(player_getId(&players[i]) == id) return &players[i]; + } + return NULL; +} + +// Gets +int player_getId(Player *player) { return player -> id; } +char *player_getName(Player *player) { return player -> name; } +int player_getHeight(Player *player) { return player -> height; } +int player_getWeight(Player *player) { return player -> weight; } +char *player_getCollege(Player *player) { return player -> college; } +int player_getBirthYear(Player *player) { return player -> birthYear; } +char *player_getBirthCity(Player *player) { return player -> birthCity; } +char *player_getBirthState(Player *player) { return player -> birthState; } + +// Sets +void player_setId(Player *player, int id) { player -> id = id; } +void player_setName(Player *player, char *name) { strcpy(player -> name, name); } +void player_setHeight(Player *player, int height) { player -> height = height; } +void player_setWeight(Player *player, int weight) { player -> weight = weight; } +void player_setBirthYear(Player *player, int birthYear) { player -> birthYear = birthYear; } +void player_setBirthCity(Player *player, char *birthCity) { strcpy(player -> birthCity, birthCity); } +void player_setBirthState(Player *player, char *birthState) { strcpy(player -> birthState, birthState); } +void player_setCollege(Player *player, char *college) { strcpy(player -> college, college); } + +// General +void startPlayers() { + + // Open file + FILE *fp; + char *line = NULL; + size_t len = 0; + ssize_t read; + + fp = fopen(FILE_PATH, "r"); + + if(fp == NULL) { + + perror("x Error opening file"); + exit(EXIT_FAILURE); + } + + // Skip first line + getline(&line, &len, fp); + + // Read all lines + while((read = getline(&line, &len, fp)) != -1) { + + // Read player from line + Player player = player_read(line); + + players[playersLength++] = player; + + if(playersLength >= MAX_PLAYERS) { + + perror("x Max players reached"); + exit(EXIT_FAILURE); + } + } + + // Close file and free memory + fclose(fp); + + if(line) free(line); +} + +// ---------------------------------------------------------------------------------------------------- // + +// Main +int main() { + + // ----------------------------------------------------------------- // + + // #1 - Start - Read all players in CSV file + startPlayers(); + + // ----------------------------------------------------------------- // + + // #2 - Read input and print players from pub.in id entries + char in[5]; + scanf(" %[^\n]s", in); + + while(true) { + + if(isEnd(in)) break; + else { + + int id = atoi(in); + + Player *player = player_searchById(id); + + if(player) player_print(player); + else printf("x Player not found!\n"); + + // ------------------------- // + + scanf(" %[^\n]s", in); + } + } + return 0; +} \ No newline at end of file diff --git a/tps/gabaritos/tp02/TP02Q02 - Classe em C/pedro.out b/tps/gabaritos/tp02/TP02Q02 - Classe em C/pedro.out new file mode 100644 index 0000000..3b0b6fc --- /dev/null +++ b/tps/gabaritos/tp02/TP02Q02 - Classe em C/pedro.out @@ -0,0 +1,40 @@ +[106 ## Walt Lautenbach ## 188 ## 83 ## 1922 ## University of Wisconsin ## nao informado ## nao informado] +[1228 ## Willie Wise ## 196 ## 95 ## 1947 ## Drake University ## San Francisco ## California] +[1307 ## James Hardy ## 203 ## 99 ## 1956 ## University of San Francisco ## Knoxville ## Alabama] +[1397 ## Joe Barry ## 193 ## 88 ## 1969 ## Georgia Institute of Technology ## Oakland ## California] +[1412 ## Darrell Griffith ## 193 ## 86 ## 1958 ## University of Louisville ## Louisville ## Kentucky] +[1554 ## Clark Kellogg ## 201 ## 102 ## 1961 ## Ohio State University ## Cleveland ## Ohio] +[1585 ## Trent Tucker ## 196 ## 87 ## 1959 ## University of Minnesota ## Tarboro ## North Carolina] +[1669 ## Stuart Gray ## 213 ## 106 ## 1963 ## University of California - Los Angeles ## Panama Canal Zone ## Panama] +[1750 ## Terry Porter ## 190 ## 88 ## 1963 ## University of Wisconsin-Stevens Point ## Milwaukee ## Wisconsin] +[1928 ## Andrew Lang ## 211 ## 111 ## 1966 ## University of Arkansas ## Pine Bluff ## Arkansas] +[1961 ## Anthony Taylor ## 193 ## 79 ## 1965 ## University of Oregon ## Los Angeles ## California] +[2107 ## Tony Smith ## 201 ## 95 ## 1968 ## nao informado ## nao informado ## nao informado] +[2108 ## Felton Spencer ## 213 ## 120 ## 1968 ## University of Louisville ## Louisville ## Kentucky] +[2127 ## Terrell Brandon ## 180 ## 81 ## 1970 ## University of Oregon ## Portland ## Oregon] +[2159 ## Dikembe Mutombo* ## 218 ## 111 ## 1966 ## Georgetown University ## Kinshasa ## Democratic Republic of the Congo] +[2317 ## Derrick Alston ## 211 ## 102 ## 1972 ## Duquesne University ## Bronx ## New York] +[2453 ## Bruce Bowen ## 201 ## 83 ## 1971 ## California State University - Fullerton ## Merced ## California] +[2462 ## Tony Delk ## 185 ## 85 ## 1974 ## University of Kentucky ## Covington ## Tennessee] +[2681 ## Jumaine Jones ## 203 ## 98 ## 1979 ## University of Georgia ## Cocoa ## Florida] +[2735 ## Mark Madsen ## 206 ## 108 ## 1976 ## Stanford University ## Walnut Creek ## California] +[2806 ## Antonis Fotsis ## 208 ## 99 ## 1981 ## nao informado ## Athens ## Greece] +[2861 ## Gordan Giricek ## 198 ## 95 ## 1977 ## nao informado ## Zagreb ## Croatia] +[2996 ## Matt Freije ## 208 ## 108 ## 1981 ## Vanderbilt University ## Overland Park ## Kansas] +[3059 ## Noel Felix ## 206 ## 102 ## 1981 ## California State University - Fresno ## Los Angeles ## California] +[3117 ## Hakim Warrick ## 206 ## 99 ## 1982 ## Syracuse University ## Philadelphia ## Pennsylvania] +[3150 ## Randy Foye ## 193 ## 96 ## 1983 ## Villanova University ## Newark ## New Jersey] +[3154 ## Daniel Gibson ## 188 ## 86 ## 1986 ## University of Texas at Austin ## Houston ## Texas] +[3182 ## Chris Quinn ## 188 ## 83 ## 1983 ## University of Notre Dame ## New Orleans ## Louisiana] +[3229 ## Spencer Hawes ## 216 ## 111 ## 1988 ## University of Washington ## Seattle ## Washington] +[3292 ## Steven Hill ## 213 ## 112 ## 1985 ## University of Arkansas ## Chanute ## Kansas] +[3529 ## Jordan Williams ## 188 ## 83 ## 1951 ## New Mexico State University ## New Haven ## Connecticut] +[3564 ## Kris Joseph ## 201 ## 95 ## 1988 ## Syracuse University ## Montreal ## Canada] +[3565 ## Michael Kidd-Gilchrist ## 201 ## 105 ## 1993 ## University of Kentucky ## Philadelphia ## Pennsylvania] +[3670 ## Peyton Siva ## 183 ## 83 ## 1990 ## University of Louisville ## Seattle ## Washington] +[3830 ## Christian Wood ## 211 ## 99 ## 1995 ## University of Nevada - Las Vegas ## Long Beach ## California] +[3869 ## Brandon Ingram ## 206 ## 86 ## 1997 ## Duke University ## Kinston ## North Carolina] +[3879 ## Caris LeVert ## 201 ## 92 ## 1994 ## University of Michigan ## Columbus ## Ohio] +[70 ## Robert Hahn ## 208 ## 108 ## 1925 ## North Carolina State University ## nao informado ## nao informado] +[707 ## Jim Caldwell ## 208 ## 108 ## 1943 ## Georgia Institute of Technology ## Durham ## North Carolina] +[723 ## Dave Lattin ## 198 ## 102 ## 1943 ## University of Texas at El Paso ## Houston ## Texas] diff --git a/tps/gabaritos/tp02/TP02Q02 - Classe em C/pub.in b/tps/gabaritos/tp02/TP02Q02 - Classe em C/pub.in new file mode 100644 index 0000000..5030a68 --- /dev/null +++ b/tps/gabaritos/tp02/TP02Q02 - Classe em C/pub.in @@ -0,0 +1,41 @@ +106 +1228 +1307 +1397 +1412 +1554 +1585 +1669 +1750 +1928 +1961 +2107 +2108 +2127 +2159 +2317 +2453 +2462 +2681 +2735 +2806 +2861 +2996 +3059 +3117 +3150 +3154 +3182 +3229 +3292 +3529 +3564 +3565 +3670 +3830 +3869 +3879 +70 +707 +723 +FIM diff --git a/tps/gabaritos/tp02/TP02Q02 - Classe em C/pub.out b/tps/gabaritos/tp02/TP02Q02 - Classe em C/pub.out new file mode 100644 index 0000000..3b0b6fc --- /dev/null +++ b/tps/gabaritos/tp02/TP02Q02 - Classe em C/pub.out @@ -0,0 +1,40 @@ +[106 ## Walt Lautenbach ## 188 ## 83 ## 1922 ## University of Wisconsin ## nao informado ## nao informado] +[1228 ## Willie Wise ## 196 ## 95 ## 1947 ## Drake University ## San Francisco ## California] +[1307 ## James Hardy ## 203 ## 99 ## 1956 ## University of San Francisco ## Knoxville ## Alabama] +[1397 ## Joe Barry ## 193 ## 88 ## 1969 ## Georgia Institute of Technology ## Oakland ## California] +[1412 ## Darrell Griffith ## 193 ## 86 ## 1958 ## University of Louisville ## Louisville ## Kentucky] +[1554 ## Clark Kellogg ## 201 ## 102 ## 1961 ## Ohio State University ## Cleveland ## Ohio] +[1585 ## Trent Tucker ## 196 ## 87 ## 1959 ## University of Minnesota ## Tarboro ## North Carolina] +[1669 ## Stuart Gray ## 213 ## 106 ## 1963 ## University of California - Los Angeles ## Panama Canal Zone ## Panama] +[1750 ## Terry Porter ## 190 ## 88 ## 1963 ## University of Wisconsin-Stevens Point ## Milwaukee ## Wisconsin] +[1928 ## Andrew Lang ## 211 ## 111 ## 1966 ## University of Arkansas ## Pine Bluff ## Arkansas] +[1961 ## Anthony Taylor ## 193 ## 79 ## 1965 ## University of Oregon ## Los Angeles ## California] +[2107 ## Tony Smith ## 201 ## 95 ## 1968 ## nao informado ## nao informado ## nao informado] +[2108 ## Felton Spencer ## 213 ## 120 ## 1968 ## University of Louisville ## Louisville ## Kentucky] +[2127 ## Terrell Brandon ## 180 ## 81 ## 1970 ## University of Oregon ## Portland ## Oregon] +[2159 ## Dikembe Mutombo* ## 218 ## 111 ## 1966 ## Georgetown University ## Kinshasa ## Democratic Republic of the Congo] +[2317 ## Derrick Alston ## 211 ## 102 ## 1972 ## Duquesne University ## Bronx ## New York] +[2453 ## Bruce Bowen ## 201 ## 83 ## 1971 ## California State University - Fullerton ## Merced ## California] +[2462 ## Tony Delk ## 185 ## 85 ## 1974 ## University of Kentucky ## Covington ## Tennessee] +[2681 ## Jumaine Jones ## 203 ## 98 ## 1979 ## University of Georgia ## Cocoa ## Florida] +[2735 ## Mark Madsen ## 206 ## 108 ## 1976 ## Stanford University ## Walnut Creek ## California] +[2806 ## Antonis Fotsis ## 208 ## 99 ## 1981 ## nao informado ## Athens ## Greece] +[2861 ## Gordan Giricek ## 198 ## 95 ## 1977 ## nao informado ## Zagreb ## Croatia] +[2996 ## Matt Freije ## 208 ## 108 ## 1981 ## Vanderbilt University ## Overland Park ## Kansas] +[3059 ## Noel Felix ## 206 ## 102 ## 1981 ## California State University - Fresno ## Los Angeles ## California] +[3117 ## Hakim Warrick ## 206 ## 99 ## 1982 ## Syracuse University ## Philadelphia ## Pennsylvania] +[3150 ## Randy Foye ## 193 ## 96 ## 1983 ## Villanova University ## Newark ## New Jersey] +[3154 ## Daniel Gibson ## 188 ## 86 ## 1986 ## University of Texas at Austin ## Houston ## Texas] +[3182 ## Chris Quinn ## 188 ## 83 ## 1983 ## University of Notre Dame ## New Orleans ## Louisiana] +[3229 ## Spencer Hawes ## 216 ## 111 ## 1988 ## University of Washington ## Seattle ## Washington] +[3292 ## Steven Hill ## 213 ## 112 ## 1985 ## University of Arkansas ## Chanute ## Kansas] +[3529 ## Jordan Williams ## 188 ## 83 ## 1951 ## New Mexico State University ## New Haven ## Connecticut] +[3564 ## Kris Joseph ## 201 ## 95 ## 1988 ## Syracuse University ## Montreal ## Canada] +[3565 ## Michael Kidd-Gilchrist ## 201 ## 105 ## 1993 ## University of Kentucky ## Philadelphia ## Pennsylvania] +[3670 ## Peyton Siva ## 183 ## 83 ## 1990 ## University of Louisville ## Seattle ## Washington] +[3830 ## Christian Wood ## 211 ## 99 ## 1995 ## University of Nevada - Las Vegas ## Long Beach ## California] +[3869 ## Brandon Ingram ## 206 ## 86 ## 1997 ## Duke University ## Kinston ## North Carolina] +[3879 ## Caris LeVert ## 201 ## 92 ## 1994 ## University of Michigan ## Columbus ## Ohio] +[70 ## Robert Hahn ## 208 ## 108 ## 1925 ## North Carolina State University ## nao informado ## nao informado] +[707 ## Jim Caldwell ## 208 ## 108 ## 1943 ## Georgia Institute of Technology ## Durham ## North Carolina] +[723 ## Dave Lattin ## 198 ## 102 ## 1943 ## University of Texas at El Paso ## Houston ## Texas]