Question: Your company has asked you to develop a report detailing payroll information with the following format: Acme Corporation Number of Employees: 3 Average Salary: 53,502.32
Your company has asked you to develop a report detailing payroll information with the following format:
| Acme Corporation
Number of Employees: 3 Average Salary: 53,502.32 Annual Total: 160,506.95
Name Rank Salary Jones, William B2 42,500.00 Baker, Susan A3 65,000.00 Baer, Teddy B4 53,006.95 |
Develop an Employee class that contains first name, last name, rank, and salary. The class should have the following methods:
parameterized constructor
getters necessary for printing the report
formatName() method that returns a String with the name in the format last, first
Employee information is stored in a sequential text file named employees.txt. The file has the format:
employees.txt file: text file with the following fields separated by spaces:
| Fields | Description |
| First Name | string |
| Last Name | string |
| Rank | string |
| Salary | double |
Note: Names will not contain spaces.
Write a program named Prog5 that reads employee information from the file and places a corresponding Employee object into an array. After the file has been read, print the report shown above using proper formatting.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
