Write a program that calculates the average number of days a company's employees are absent during the year and outputs a report on a file named "employeeAbsences.txt".      Project Specifications   Input for this project: the user must enter the number of employees in the company.  the user must enter as integers for each employee: the employee number (ID) the number of days that employee missed during the past year.  Input Validation:  Do not accept a number less than 1 for the number of employees. Do not accept a negative number for the days any employee missed. Be sure to print appropriate error messages for these items if the input is invalid.   Output: The program should display the following data:   display a user full name display a due date display the user full name Each employee number (ID) and the number of days missed should be written to the report file named "txt". The average number of days a company's employees are absenting during the year should be written to the report file named "employeeAbsences.t

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter5: Making Decisions
Section: Chapter Questions
Problem 4PE
icon
Related questions
Question

Write a program that calculates the average number of days a company's employees are absent during the year and outputs a report on a file named "employeeAbsences.txt". 

 

 

Project Specifications

 

Input for this project:

  • the user must enter the number of employees in the company. 
  • the user must enter as integers for each employee:
    • the employee number (ID)
    • the number of days that employee missed during the past year. 

Input Validation: 

  • Do not accept a number less than 1 for the number of employees.
  • Do not accept a negative number for the days any employee missed.
  • Be sure to print appropriate error messages for these items if the input is invalid.

 

Output: The program should display the following data:

 

  • display a user full name
  • display a due date
  • display the user full name
  • Each employee number (ID) and the number of days missed should be written to the report file named "txt".
  • The average number of days a company's employees are absenting during the year should be written to the report file named "employeeAbsences.txt".
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps

Blurred answer
Knowledge Booster
Concept of Flowchart
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
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,