Writing a program that runs in C
Programming Assignment
#4
EE 2372
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.
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
23 | 24 | 25 | 26 | 27 | 28 | 1 |
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 | 29 |
30 | 31 | 1 | 2 | 3 | 4 | 5 |
Get Free Quote!
375 Experts Online