Question: Need help Programming in C. The user should upon start (and after every command other than quit) be shown a menu which identifies the sets

Need help Programming in C.

The user should upon start (and after every command other than quit) be shown a menu which identifies the sets of things that the user can do with the given list. The user selects an action based on the given number of the item (for instance, Reset is 1).

1. Reset o Resets the list of employees by recreating the list of employees. The list should be a dynamic array composed of a random number of employees - An employee is a struct with the following fields which should be initialized at random: - EID -> 5 digit integer - Name -> string containing the name of the employee - Salary -> float containing the salary of the given employee

2. Print o Shows the list of employees by looping through the list of employees and displaying each in the following manner: EID: Name: Salary: $

3. Sort by EID - Simply sorts the list by EID (use some sorting mechanism)

4. Sort by Salary - Simply sorts the list by Salary (use some sorting mechanism)

5. Show all employees EID and Name for those making over 50K - Shows the employees from the list matching the criteria by looping through the list of employees and displaying each in the same manner as the print command.

6. Quit - Allows the menu loop to quit

For the menu items, use an array of functions and then the selection of the next action (other than quit) is then an index into the array.

Add an additional menu item that allows for the deletion of a given employee (use EID). You must remove the item from the list and fix the array (all items must be contiguous).

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!