This lab will test your ability to use structures and arrays of structures. Your program files should be called Employee.c and Employee.h. Skeleton code has been prepared for you: Employee.c and Employee.h. Your program will keep a database of employee information through an array of structures of type Employee. Your program should be able to display the data of all employees in the database, add an employee to the database, update the salary of an existing employee, and remove an employee from the database. The database is limited in size. Your program should run as follows: . ● . . The Employee data structure should appear in Employee.h and contain the following elements: id - integer age-integer salary double precision floating point The remainder of your code should appear in Employee.c which will include Employee.h. There should be a maximum of SIZE employees in the database, where SIZE=4. This means you create an array of type Employee that can hold up to SIZEemployees. The user interface should look as follows: ---=== EMPLOYEE DATA ===-.. 1. Display Employee Information 2. Add Employee 3. Update Employee Salary 4. Remove Employee 0. Exit Please select from the above options: Display Employee Information should display employee id, age and salary for each employee. The loop construct will be run for SIZE times and will only display Employee data where the EmployeeID is greater than 0. Add Employee will look for an open spot in the employee array (where employee id=0), then will prompt the user for employee data. If the employee database is full, an error message is printed to the screen: ERROR!!! Maximum Number of Employees Reached. Update Employee Salary will prompt the user for the employee's id and search the employee array for the employee by id. If the employee is found, the user is prompted for the new salary. If the employee is not found, an error message is printed: *** ERROR: Employee ID not found! *** Remove Employee will prompt the user for the employee's id and search the employee array for the employee by id. If the employee is found, the employee is removed from the array by setting the employee's id to 0. If the employee is not found, an error message is printed: *** ERROR: Employee ID not found! *** Exit will exit the program. As the program is exiting, the following is printed to the screen: Exiting Employee Data Program. Good Bye!!! Any selection other than 0-4 will result in the following printed to the screen: ERROR: Incorrect Option: Try Again

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
100%
Please due in C++
This lab will test your ability to use structures and arrays of structures.
Your program files should be called Employee.c and Employee.h. Skeleton code has
been prepared for you: Employee.c and Employee.h.
Your program will keep a database of employee information through an array of
structures of type Employee. Your program should be able to display the data of all
employees in the database, add an employee to the database, update the salary of an
existing employee, and remove an employee from the database. The database is limited
in size. Your program should run as follows:
.
The Employee data structure should appear in Employee.h and contain the
following elements:
id - integer
age - integer
salary - double precision floating point
The remainder of your code should appear in Employee.c which will
include Employee.h.
There should be a maximum of SIZE employees in the database, where SIZE=4.
This means you create an array of type Employee that can hold up
to SIZEemployees.
The user interface should look as follows:
---=== EMPLOYEE DATA ===---
1. Display Employee Information.
2. Add Employee
3. Update Employee Salary
4. Remove Employee
0. Exit
Please select from the above options:
Display Employee Information should display employee id, age and salary for
each employee. The loop construct will be run for SIZE times and will only
display Employee data where the EmployeeID is greater than 0.
Add Employee will look for an open spot in the employee array (where
employee id=0), then will prompt the user for employee data. If the employee
database is full, an error message is printed to the screen:
ERROR!!! Maximum Number of Employees Reached.
Update Employee Salary will prompt the user for the employee's id and search
the employee array for the employee by id. If the employee is found, the user is
prompted for the new salary. If the employee is not found, an error message is
printed:
*** ERROR: Employee ID not found! ***
Remove Employee will prompt the user for the employee's id and search the
employee array for the employee by id. If the employee is found, the employee is
removed from the array by setting the employee's id to 0. If the employee is not
found, an error message is printed:
*** ERROR: Employee ID not found! ***
Exit will exit the program. As the program is exiting, the following is printed to
the screen:
Exiting Employee Data Program. Good Bye!!!
Any selection other than 0-4 will result in the following printed to the screen:
ERROR: Incorrect Option: Try Again
Transcribed Image Text:This lab will test your ability to use structures and arrays of structures. Your program files should be called Employee.c and Employee.h. Skeleton code has been prepared for you: Employee.c and Employee.h. Your program will keep a database of employee information through an array of structures of type Employee. Your program should be able to display the data of all employees in the database, add an employee to the database, update the salary of an existing employee, and remove an employee from the database. The database is limited in size. Your program should run as follows: . The Employee data structure should appear in Employee.h and contain the following elements: id - integer age - integer salary - double precision floating point The remainder of your code should appear in Employee.c which will include Employee.h. There should be a maximum of SIZE employees in the database, where SIZE=4. This means you create an array of type Employee that can hold up to SIZEemployees. The user interface should look as follows: ---=== EMPLOYEE DATA ===--- 1. Display Employee Information. 2. Add Employee 3. Update Employee Salary 4. Remove Employee 0. Exit Please select from the above options: Display Employee Information should display employee id, age and salary for each employee. The loop construct will be run for SIZE times and will only display Employee data where the EmployeeID is greater than 0. Add Employee will look for an open spot in the employee array (where employee id=0), then will prompt the user for employee data. If the employee database is full, an error message is printed to the screen: ERROR!!! Maximum Number of Employees Reached. Update Employee Salary will prompt the user for the employee's id and search the employee array for the employee by id. If the employee is found, the user is prompted for the new salary. If the employee is not found, an error message is printed: *** ERROR: Employee ID not found! *** Remove Employee will prompt the user for the employee's id and search the employee array for the employee by id. If the employee is found, the employee is removed from the array by setting the employee's id to 0. If the employee is not found, an error message is printed: *** ERROR: Employee ID not found! *** Exit will exit the program. As the program is exiting, the following is printed to the screen: Exiting Employee Data Program. Good Bye!!! Any selection other than 0-4 will result in the following printed to the screen: ERROR: Incorrect Option: Try Again
Expert Solution
steps

Step by step

Solved in 5 steps with 9 images

Blurred answer
Knowledge Booster
Reference Types in Function
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education