Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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:

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Computer Aided Database Design

Authors: Antonio Albano, Valeria De Antonellis, A. Di Leva

1st Edition

0444877355, 978-0444877352

More Books

Students also viewed these Databases questions

Question

u = 5 j , v = 6 i Find the angle between the vectors.

Answered: 1 week ago