The Payroll Department keeps a list of employee information for each pay period in a text file. The format of each line of the file is the following:  Write a program that inputs a filename from the user and prints to the terminal a report of the wages paid to the employees for the given period. The report should be in tabular format with the appropriate header. Each line should contain: An employee’s name The hours worked The wages paid for that period. An example of the program input and output is shown below:

CMPTR
3rd Edition
ISBN:9781337681872
Author:PINARD
Publisher:PINARD
Chapter7: Exploring Windows 10 And Managing Files
Section: Chapter Questions
Problem 10QY
icon
Related questions
Question

The Payroll Department keeps a list of employee information for each pay period in a text file. The format of each line of the file is the following: <last name> <hours worked> <hourly wage>

Write a program that inputs a filename from the user and prints to the terminal a report of the wages paid to the employees for the given period.

  • The report should be in tabular format with the appropriate header.
  • Each line should contain:
    • An employee’s name
    • The hours worked
    • The wages paid for that period.

An example of the program input and output is shown below:

 

Enter the file name: data.txt
Name
Lambert
Osborne
Giacometti
Hours
34
22
5
Total Pay
357.00
137.50
503.50
Transcribed Image Text:Enter the file name: data.txt Name Lambert Osborne Giacometti Hours 34 22 5 Total Pay 357.00 137.50 503.50
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 3 images

Blurred answer
Knowledge Booster
Constants and Variables
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
Recommended textbooks for you
CMPTR
CMPTR
Computer Science
ISBN:
9781337681872
Author:
PINARD
Publisher:
Cengage
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
Computer Science
ISBN:
9780357392676
Author:
FREUND, Steven
Publisher:
CENGAGE L
MIS
MIS
Computer Science
ISBN:
9781337681919
Author:
BIDGOLI
Publisher:
Cengage
Enhanced Discovering Computers 2017 (Shelly Cashm…
Enhanced Discovering Computers 2017 (Shelly Cashm…
Computer Science
ISBN:
9781305657458
Author:
Misty E. Vermaat, Susan L. Sebok, Steven M. Freund, Mark Frydenberg, Jennifer T. Campbell
Publisher:
Cengage Learning
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,