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

Login to view and/or buy answers.. or post an answer

Related Questions

Similar orders to Need someone to do my project
16
Views
0
Answers
Attendance System
You need to ensure that the application uses the most efficient Object-Oriented Techniques, is structured in three-tier architecture, and has proper Object-Relational mapping (ORM) to allow for efficient persistence. The application should have the follow...
27
Views
0
Answers
Fundamental Breakout game(brick breaker) using C++
It is a fundamental C++ based project that requires a simple breakout (brick breaker) game coded using the requirements provided in the problem statement pdf attached. Use of pointers is not allowed. Also use of goto, break, or continue statements is not a...
33
Views
0
Answers
Build a basic spam email filter based on machine learning using C++.
For this laboratory assignment, you will work in groups (1-3) to build a basic spam email filter based on machine learning using C++. No worries, I won’t ask you to implement the machine learning code! You will be using an existing machine learning ...
26
Views
0
Answers
Please do my c++ atm homework
I am looking for someone to do my c++ atm homework. The assignment can be done in either C, C#, or C++. The assignment must fully capture the operations of a real bank ATM with the ability to deposit, withdraw, check balance, and deduct operation charges. ...