Question
Appreciating your cooperation, I want the following Deliverables: Flowchart for the Program, C++ files (source code), screenshot of the Output. I have found similar project,
Appreciating your cooperation, I want the following Deliverables: Flowchart for the Program, C++ files (source code), screenshot of the Output. I have found similar project, but it doesn't have a flow chart and the output screenshot needs to be the same as what i have attached here. Thanks
Project Description
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 students 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 "employeeAbsences.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".
Processing Requirements
Create the following three functions that will be called by the main function:
A first function asks a user for the number of employees in the company. This value should be returned as an int. The function accepts no arguments.
A second function that does the following:
Asks the user to enter for the following information each employee:
the employee number (ID)
the number of days that employee missed during the past year.
Writes each employee number (ID) and the number of days missed to the output file.
The function returns the total of missed days as an int. Assume the employee number (ID) is 4 digits or fewer, but don't validate it.
The function accepts two arguments:
The name of the file stream object as a reference parameter of type ofstream
The number of employees in the company as int.
A third function calculates the average number of days absent.
The function takes two arguments:
the number of employees in the company
the total number of days absent for all employees during the year.
The function should return, as a double, the average number of days absent.
This function does not perform screen or file output and does not ask the user for input.
novaPDF 9 Tell me what you want to do Mailings Review View Help References AaBbCc AaBbCcDdi AaBbCcDd AaBbCcDd AaBbCo am. Heading 2 Heading 3L1Normal 11No Sna -2- Paragraph Sample Screen Output: Mark C:lwindowssystem32cmd.exe Calculate the average nunber of days a company's employees are absent Please enter the number of enployees in the company: 5 Please enter an employee ID: 1234 lease enter the number of days this employee was absent: 3 Please enter an employee ID: 22 Please enter the nunber of days this employee was absent: 0 Please enter an employee ID: 667 lease enter the nunber of days this enployee was absent: -5 he nunber of days nust not be negative Please re-enter the number of days absent: 5 Please enter an employee ID: 4 lease enter the number of days this employee was absent: 11 Please enter an enployee ID: 9876 lease enter the number of days this employee was absent: 1 Programmer: insert your name here Press any key to continue. Sample File Output: employeeAbsences.txt + daysOut.cpp LOYEE ABSENCE REPORT employee id days absent 9876 The 5 employees were absent a total of 20 days. The average number of days absent is 4.0 days. Programmer: insert your name here
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started