This project requires the use of the employees.dat file (supplied). The record format in the file is listed below (separated by a single space): first_name    last_name    employee_id   phone_number Overview You've been asked by your employer to create a employee registry program. The program will be used by the HR department to maintain employee records. Requirements When your program starts, it should read the employees.dat file into memory. A menu should be displayed like below. 1.     List all employee details 2.     List employee by last name 3.     Add a new employee 4.     Remove an employee 5.     Show all managers only 6.     Show all staff only 7.     Quit Each menu option should be handled by its own function. You should add utility functions as needed. When option 1 is selected your program should lists all the information for each employee in a tabular format. When option 2 is selected your program should prompt the user to enter an employee's last name. If the name entered can be found, your program should list all employee details for that employee. If the name cannot be found, your program should display a message stating so. When option 3 is selected your program should prompt the user to enter the employee's first name, last name, employee Id, and phone number. When option 4 is selected your program should allow the user to remove an employee by either last name or employee Id. When option 5 is selected your program should display only managers. All managers have an Id that starts with the number 8. When option 6 is selected your program should display only employees. All employees have an Id that starts with the number 1. When option 7 is selected your program should update the employees.dat file and terminate. Additional Requirements ·       Your program must utilize a struct to hold all employee information and an array to hold all the structs. ·       Your array should be able to hold any number of employees. The initial array should 1.5 the size of the initial list to allow for easier adding/removing. When the array is full, then it should increase to 1.5 times the size. You should not resize when data is removed. ·       All input must be verified using "reasonableness" reasoning. ·       You may not use vectors or any other C++ container type for this program.

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter13: File Input And Output
Section: Chapter Questions
Problem 8PE
icon
Related questions
Question

This project requires the use of the employees.dat file (supplied). The record format in the file is listed below (separated by a single space):

first_name    last_name    employee_id   phone_number

Overview

You've been asked by your employer to create a employee registry program. The program will be used by the HR department to maintain employee records.

Requirements

When your program starts, it should read the employees.dat file into memory. A menu should be displayed like below.

1.     List all employee details

2.     List employee by last name

3.     Add a new employee

4.     Remove an employee

5.     Show all managers only

6.     Show all staff only

7.     Quit

Each menu option should be handled by its own function. You should add utility functions as needed.

When option 1 is selected your program should lists all the information for each employee in a tabular format.

When option 2 is selected your program should prompt the user to enter an employee's last name. If the name entered can be found, your program should list all employee details for that employee. If the name cannot be found, your program should display a message stating so.

When option 3 is selected your program should prompt the user to enter the employee's first name, last name, employee Id, and phone number.

When option 4 is selected your program should allow the user to remove an employee by either last name or employee Id.

When option 5 is selected your program should display only managers. All managers have an Id that starts with the number 8.

When option 6 is selected your program should display only employees. All employees have an Id that starts with the number 1.

When option 7 is selected your program should update the employees.dat file and terminate.

Additional Requirements

·       Your program must utilize a struct to hold all employee information and an array to hold all the structs.

·       Your array should be able to hold any number of employees. The initial array should 1.5 the size of the initial list to allow for easier adding/removing. When the array is full, then it should increase to 1.5 times the size. You should not resize when data is removed.

·       All input must be verified using "reasonableness" reasoning.

·       You may not use vectors or any other C++ container type for this program.

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Windows
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
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning