Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In this program, you will manage the information of employees in a company. You will read the employees.txt file and store every employee information in

In this program, you will manage the information of employees in a company. You will read the employees.txt file and store every employee information in a struct called Employee. You will have an array of Employee structs to keep the information of all employees. The employees.txt file may be in different size. The first line of the file shows the number of employees. And the rest of the file contains a single employee information in each line. After you learned the number, you will dynamically define the array size using dynamic memory allocation. Each employee has 5 information such as Employee ID, Employee Name, Department ID, Department Name, and Salary. Each information will be stored in a field in the Employee struct. Once your struct array is ready, you will provide following operations to the user in a menu. Print All Employees Print all information of all Employees Print By Department Get an input from the user (department ID) Print all information only for employees in that department Print By Salary Get a salary input from the user Print all employees that have equal or more annual salary to given input Exit Exit from the program As a bonus feature you can add following operations in the menu of your program Print By Name (BONUS Option) Get a character from the user. Print only the employees whose name starts with that character. Update Employee Information Get an Emp ID from the user. Ask which information to be updated. Let user update that information of the employee.

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_2

Step: 3

blur-text-image_3

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

Programming The Perl DBI Database Programming With Perl

Authors: Tim Bunce, Alligator Descartes

1st Edition

1565926994, 978-1565926998

More Books

Students also viewed these Databases questions