Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

MongoDB Applied Design Patterns Practical Use Cases With The Leading NoSQL Database

Authors: Rick Copeland

1st Edition

1449340040, 978-1449340049

More Books

Students also viewed these Databases questions

Question

Discuss the consequences of ethical misconduct.

Answered: 1 week ago

Question

What are the potential limitations of group discussion?

Answered: 1 week ago

Question

=+What kinds of problems need to be overcome?

Answered: 1 week ago

Question

=+Describe an important trade-off you recently faced

Answered: 1 week ago