Need someone to do my project
Its a project in the C language and we have to use dynamic allocation of memory, so malloc() and free() and we also have to use hash tables to do certain structs and stuff. We can't use global variables or static variable because the teacher will give us less points if we use them. Since im from Portugal the errors are going to have to be in portuguese but I'm going to give all of the details on the functions so you dont have to worry. If we type a certain letter followed by some specifications the program will have to execute it by going to the function that corresponds to the letter . Also the NL you are going to see is the line of the input from test scripts the teacher uses to test our project, so each time we call a function we need to have some sort of counter that adds 1 for each function call and prints it on the output and that is going to be the NL you are going to see, it means Input line. I'm gonna give you details now.
Functions:
a â Adds a new game to the game data base
Input : "a name:team1:team2:score1:score2"
Output: Nothing except for errors
Errors: "NL Jogo existente." â Means Game Existent, so it wont create a game with the same name
"NL Equipa inexistente." â Means one or two of the teams we tried to put in dont exist
A â Adds a new team to the team database
Input: "A name"
Output: Nothing except for errors
Errors: "NL Equipa existente." â Means there already is a team with that name so it won't create another one
l (its a non capital l) â Lists all of the games by order of introduction
Input: "l"
Output: "NL name-game name-team1 name-team2 score1 score2"
You have to do each line of output like that for every game that exists in the database
If there arent any games in the database and you call the 'l' command it shouldnt do anything
p â Looks for a certain game in the database
Input: "p game-name"
Output: "NL game-name" or errors
Errors: "NL Jogo inexistente." â In case there isnt a game in database with that name
P â Looks for a certain team in the database
Input: "p team-name"
Output: "NL team-name number-of-games-won" or errors
Errors: "NL Equipa inexistente." â In case there isnt a team in the database with that name
r â deletes a game from the database
Input: "r game-name"
Output: Nothing except for errors
Errors: "NL Jogo inexistente." â in case there isnt a team in the database with that name
s â alters the score of a game
Input: "s game-name:score1:score2"
Output: Nothing except for errors
Errors: "NL Jogo inexistente." â in case there isnt a team in the database with that name
g â finds the teams with most games won and lists them in alphabetical order
Input: "g"
Output Example: NL Melhores number-of-games-won
NL * team-name1
NL * team-name2
NL * team-name3
â¦
If there isnt any team in the database it shouldnt print anything not even Melhores (which means best in portuguese) if there is only 1 team with most games won it should print that team and if theres 2 with same games won and they're both the best it prints both of them and so on.
x- ends the program
Input: "x"
Output: Nothing
So thats the project right there and I would say you have to use structs for the games and teams and you have to keep track of each teams number of victories.
And also the game-names and team-names have a limit of 1023 characters but they are probably never gonna use them on the script tests so you should only allocate the memory you need for the names and for pretty much everything in the project.
Ohh yes one last thing, if you could arrange the program in various files it would be great, for example main.c, functions.c, structures.h and variables.h
Get Help With a similar task to - Need someone to do my project
Related Questions
Tutlance Experts offer help in a wide range of topics. Here are some of our top services:
- Math homework help
- Nursing homework help
- Statistics homework help
- Nursing coursework help
- Capstone project writing services
- Essay writers for hire
- Case study writing help
- Buy college papers online
- Buy college research papers
- College homework help
- Professional resume writing services
- Programming homework help
- Coursework writing help
- Term paper writing help
- Biology homework help
- Do my physics homework
- Dissertation data analysis help
- PhD Dissertation writing services
- Chemistry homework help
Post your project now for free and watch professional experts outbid each other in just a few minutes.