View the step-by-step solution to:

Write a PERL PROGRAM that reads in, displays, and manipulates an array of employee records. An employee record has the following structure: Employee...

1. Write a PERL PROGRAM that reads in, displays, and manipulates an array of employee records.
An employee record has the following structure:
Employee Record:
Name : NameType
Age : Integer
Hourly Rate : Real
Name Type:
First : String
Middle : String
Last : String

The raw data for the employee record is stored in space delimited format in the file employee.txt:

robert francis dugan 40 10.00
rebecca mae dugan 32 15.00
benjamin robert dugan 0 5.00
cricket dory dugan 22 8.00
micheal gerald dugan 39 18.00
carrie marie dugan 40 12.00
timothy joseph dugan 37 15.00
stacy jane dugan 37 19.00
patricia agnes dugan 65 20.00
anne marie dugan 93 12.00

Your program should do the following:

a) Read in the contents of employee.txt into an appropriate set of data structures. You can only read the content of the employee.txt file ONCE at the beginning of the program.

b) Present the following menu of choices:

Employee Management System
1) List employees, age, and hourly rate
2) Display average age
3) Display average hourly rate
4) Display sum of weekly salaries
5) Quit

You should write subroutines to support each of the options on the user menu. The menu subroutines should process the data structure(s) that contain the employee data. Menu options 1-3 and 5 are self explanatory. Menu option 4 should compute the weekly salary for each employee, then sum up the salaries for a single answer.
Place your solution for 1 in a single file called “hw4.f”. Attach a hard copy of your code and a screen snapshot of the execution results to the homework assignment you hand in class

Top Answer

Hello, We can only answer your free 3 questions per day one at a time. Please re-submit an individual question here:... View the full answer

Sign up to view the full answer

Why Join Course Hero?

Course Hero has all the homework and study help you need to succeed! We’ve got course-specific notes, study guides, and practice tests along with expert tutors.

-

Educational Resources
  • -

    Study Documents

    Find the best study resources around, tagged to your specific courses. Share your own to gain free Course Hero access.

    Browse Documents
  • -

    Question & Answers

    Get one-on-one homework help from our expert tutors—available online 24/7. Ask your own questions or browse existing Q&A threads. Satisfaction guaranteed!

    Ask a Question
Ask a homework question - tutors are online