Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Input File Calculations CSIS 123 C++ Programming Fundamentals Assign07-FileCalculations Input File Calculations Create this Windows console program in a suitable folder. Name the Project Assign07-FileCalculations.

Input File Calculations

image text in transcribed

CSIS 123 C++ Programming Fundamentals Assign07-FileCalculations Input File Calculations Create this Windows console program in a suitable folder. Name the Project Assign07-FileCalculations. Save the final version to the H: drive and put a copy of the entire project folder on X:t o turn in for grading Copy Performance.txt directly into the program folder holding the.cpp file. Add #include doman?p> to the other directives at the beginning of the program to allow formatting of data sent to the output stream. The program averages employee evaluation scores in five areas (completeness, efficiency, creativity, safety and courtesy). Values for each of these measures range from 1 to 5. Input each employee record, reading the employee name as a string and each of the five scores into integer variables. Count the number of employee records read from the file. Sum all five integer values for each individual and divide this total by 0 to establish an average score for each employee, stored in a double variable. Make sure that the average score is a floating-point value and is not calculated as the result of integer division. Output each employee name, followed by the individual average, rounded to one decimal place (by sending fixed and setprecision(1) to the output stream). Use setw(n) to fix the widths of the two output fields. Use a 12-character width for the employee name string. The left stream operator will ensure proper text alignment. Align the average score to the right with a 6-character width. The input file Performance.txt has this layout Roberts Brown ones Williams Smith Anderson Barrett Maxwell Grant Campbell Chavez Coursey Hanrahan Pindar Turner 4. Keep a running total of the individual employee scores. Divide this value appropriately, consid ering the number of employees in the file, to provide an overall average, rounded to one decimal place. Display this computed value on an overall average line after all records have been processed. Provide suitable heading lines for the two output columns. Enployee Rvg 3.8 3.8 4.8 4.4 2.2 3.2 4.4 3.8 3.8 1.2 4.4 2.2 3.8 1.8 4.8 Roberts Brown ones illians Snith Inderson Barrett Grant Canpbe 11 Chavez oursey Hanrahan Pindar Follow style guidelines for naming variables and follow other programming conventions. Test for successful opening of the input file before attempting to read records. Close the input file after processing to end-of-file and before displaying the overall average. urner Overall Avg: 3.8 Press CEnter> to end

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

Database Programming With Visual Basic .NET

Authors: Carsten Thomsen

2nd Edition

1590590325, 978-1590590324

More Books

Students also viewed these Databases questions

Question

c. What groups were least represented? Why do you think this is so?

Answered: 1 week ago