Writing a program that runs in C
MAKE SURE TO FOLLOW
INSTRUCTIONS CAREFULLY, IF YOU HAVE ANY DOUBTS PLEASE EMAIL ME!
IF I DO NOT SPECIFY TO DO IT
AN EXACT WAY THEN YOU CAN IMPLEMENT IT HOWEVER YOU’D LIKE.
This programming assignment will test your knowledge of link
lists and file I/O. I highly suggest that you make functions to handle most of
the things I’m asking for if not your code will be messy. I am putting a high
importance on the cleanliness of this code.
Write a C program that does/has the following:
1) Create a structure named “employee” that contains the
following fields: name (string), id (int), salary (float) and a pointer to the
next list item.
2) Create a structure that extends the “employee”
structure named “manager” that will contain an additional field for an array of
pointers that will point to the employees that they manage, each manager will
manage 3 employees.
3) Read the text file provided with this assignment to
create and fill the appropriate structures and then create two linked lists,
one for regular employees and one for managers. The text file will follow this
format, where the type will indicate if they are a manager or not (1 = manager,
0 = regular employee), if they are a manager then the IDs of the people they
manage will be listed below that.
Get Free Quote!
406 Experts Online