Question: 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
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:

jGRASP exec: java Employee Data 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 Jacob Smithson 1111 25.50 Employee name Jacob Smithson ID: 1111 Hourly wage: 25.5 Are you are finished? Y/N D n 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 Randall Matheson 1112 55.99 Employee name Randall Matheson ID: 1112 Hourly wage 55.99 Are you are finished? Y/N L ----jGRASP operation complete
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
