Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

IN JAVA Produce a department report from an employee file (Employees.dat) and a department file (Depts.txt). Input: Employee file - binary with the following fields:

IN JAVA Produce a department report from an employee file (Employees.dat) and a department file (Depts.txt).

Input:

Employee file - binary with the following fields:

Employee ID 4 bytes twos compliment integer

Last Name UTF-8 String

First Name UTF-8 String

Middle Initial 1 byte ASCII

Employee/Contractor Indicator 1 byte ASCII E for employee, C for contractor

Department Code 1 byte ASCII

Salary double precision floating point

Exempt - boolean

Hire Date 10 bytes ASCII in the form of MM/DD/YYYY

Vacation Days 2 bytes twos compliment integer

Training 1 byte binary

Department file - comma delimited text. Each line in the file represents a department. The comma delimited fields are:

Department Code

Department Name

Employee ID of the manager for the department

Output:

Print a report listing of Employees by Department. For each department, print the department name, managers name, number of employees in the department, and the sum of the vacation days of its employees. For each employee, print the employee ID, name, hire date, salary, exempt status, and vacation days. A sample report is provided below:

Administration Department

Manager: James H Trefelner

Staff Size: 39

Vacation Days: 70

ID Employee Name Hire Date Salary Exmpt Vac Days

91 Nick P Stover 05/13/2004 $ 30000.00 30

97 John G Cochran 09/15/2004 $ 27500.00 Y 22

Engineering Department

Manager: Charles Q Bruner

Staff Size: 44

Vacation Days: 66

ID Employee Name Hire Date Salary Exmpt Vac Days

92 Virginia O Clawson 01/25/2004 $ 32500.00 Y 24

94 Beverly G Noel 05/11/2002 $ 37500.00 Y 18

Implementation Requirements:

1)The data from the files must be loaded into memory before producing the report.

2)Provide formatting of the date field as shown (MM/DD/YYYY).

3)Internally use boolean for exempt and LocalDate for the hire date.

4)Print Y for exempt employees, otherwise leave blank.

ABIDE by good programming practices. Define javadoc, good formatting, etc.

Depts.txt:

A,Administration,302 E,Engineering,186 C,Construction,240 S,Sales,239 M,Marketing,250 

I dont know how to put Employees.dat on chegg so if needed i could email it.

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

Secrets Of Analytical Leaders Insights From Information Insiders

Authors: Wayne Eckerson

1st Edition

1935504347, 9781935504344

More Books

Students also viewed these Databases questions

Question

Describe Table Structures in RDMSs.

Answered: 1 week ago