Question: Assignment: In a command - line tool for data analysis, users can input a series of data entries ( numbers or words ) on separate
Assignment: In a commandline tool for data analysis, users can input a series of data entries numbers or words on separate lines. The tool will then process these entries to output a summary in a single line, where numeric entries are added together, and string entries are concatenated, all separated by commasGiven a Scanner reference variable named input associated with an input source of mixed data numbers and strings write the code to: Read every line to determine its numeric integer or textual. Sum all numeric entries and concatenate all textual entries. Print the sum of numeric entries followed by the concatenated text entries, separated by a comma. For example, if the consists of the lines "Hello", and "World", the output should be Helloworld".Hint: Use input.nextLine to read a line and input.hasNextLine to check for more input. You can then check if the next line is numeric with input.hasNextInt
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
