
Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
expand_more
expand_more
format_list_bulleted
Concept explainers
Question
thumb_up100%
Due in C please and thank you

Transcribed Image Text: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

Transcribed Image Text:A sample run is 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: 5
ERROR: Incorrect Option: Try Again
1. Display Employee Information
2. Add Employee
3. Update Employee Salary
4. Remove Employee
0. Exit
Please select from the above options: 1
EMP ID EMP AGE EMP SALARY
====== =========
====
1. Display Employee Information
2. Add Employee
3. Update Employee Salary
4. Remove Employee
0. Exit
Please select from the above options: 2
Adding Employee
Enter Employee ID: 222
Enter Employee Age: 22
Enter Employee Salary: 22222.22
1. Display Employee Information
2. Add Employee
3. Update Employee Salary
4. Remove Employee
0. Exit
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution
Trending nowThis is a popular solution!
Step by stepSolved in 4 steps with 3 images

Knowledge Booster
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
- Which of the following Excel functions will correctly calculate the square root of the value in cell A1? Group of answer choices =SQUARE_ROOT(A1) =SQRT(A1) =SQUAREROOT(A1)arrow_forwardwhere 'Where clause' used ?arrow_forwardList the employee’s first and last name and the department name he/she does NOT belong topurchasing, shipping, or sales departments. Use Not operator.arrow_forward
- In the following table, insert the proper chmod value or resulting permission. chmod Value Resulting Permission 700 rwx --- --- r-- --- --- 200 rw- --- --- --x --- --- 000 500arrow_forward5. In Customers, display cust_state followed by cust_state in lowercase, with the alias shown below. Display in alphabetical order by cust_state. CUST_STATE AZ IL IN MI OH 5 rows returned in 0.00 seconds Download mi Lowercasearrow_forwardWhen should single quotation marks be used in a WHERE clause?arrow_forward
arrow_back_ios
arrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education

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)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON

C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON

Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning

Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education