Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Make sure to use loops and IO File Streams!! Only do Part 2 Use Part 1 attached below as a reference in completing part 2.

Make sure to use loops and IO File Streams!!
Only do Part 2
Use Part 1 attached below as a reference in completing part 2. image text in transcribed
image text in transcribed
You are expected to use Loops and 10 filestreams in this program. Write comments to explain what each statement does, and how it achieves the desired results (Review the rubric posted under Course Materials to understand how your program will be graded) PART 1: Write a program in C++ that permits users to enter the following information about your company's five employees and writes the following information to the file (data.txt). ID no. Name Sex (M/EL Hourly Wages Years with company All information must be displayed in a well formatted manner, so you can put in relevant manipulators for this purpose Run your program, put in employee information (for 5 employees), and verify if you have a txt file as required. PART 2: At this point you must have a txt file with information of 5 employees Go back to your C++ program (from part 1), put the entire existing program from part 1 within block comments Now write a new program for part 2 (in that same Ch file) as per instructions given below. Write a C++ program that reads this file data.txt, one line at a time, asks for the number of hours worked by each employee and calculates their total pay for the month. So for each of the employee records that stream in, your program must ask user: Enter hours worked by (name of employee): When user puts in the answer, program must calculate the total salary and display on the computer screen as 'The salary of (name) is $ (salary) EXTRA CREDIT (10 points) Make provisions in your part 2 program for the salary information (along with some other employee details) to be stored in a new file called (February_salary.txt). Your information must be saved to the file in the following format. ID no Name Hourly wages Salary Part 1:- #include d; ein. ignore 256, '' cout

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 Systems Design Implementation And Management

Authors: Peter Rob, Carlos Coronel

6th International Edition

061921323X, 978-0619213237

More Books

Students also viewed these Databases questions