Question
Make copies of the Employee.java and EmployeeData.java files to enhance them for this project. Instead of printing each Employees data after it is entered, load
Make copies of the Employee.java and EmployeeData.java files to enhance them for this project. Instead of printing each Employees data after it is entered, load the object to an array of Employee objects containing the data input by the user. At the end of the EmployeeData program use a for loop to print a list of all the Employee objects information after all
have been input. This is a sample run:
How many Employees do you want to enter?
2
Please enter the Employee's Data separated by exactly one space first name, last name, numeric ID and hourly wage
For example:
John Smith 123456 12.50
Mary Smith 11111 19.99
Input the next Employee
John Smith 22222 25.00
Employee #1
Employee name: Mary Smith
ID: 11111
Hourly wage: 19.99
Employee #2
Employee name: John Smith
ID: 22222
Hourly wage: 25.0
Data : Employee.java , EmployeeData.java
Write a program that takes a single String of user input that is separated by spaces and parses the input into separate variables using looping and String methods. You will create an employee input program(EmployeeData.java) and class(Employee.java). EmployeeData accepts Employee information using looping to accept additional input until the user enters a value that ends the input. From a single input String, read in the employee's first name, last name, ID number and hourly wage in one line, separated by spaces. These items will be needed to populate objects or variables that will have a String for the first name, a String for the last name, an integer for employee ID and a double for wage.
After parsing the data, create an Employee class object that contains the data and a method for printing the formatted Employee Data as shown below:
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started