Question: Here is a Java programming question: Note: Use s.hasNextLine for multiple lines and terminate the input with end Don't use string.split or arrays, just use

Here is a Java programming question:

Note:

Use s.hasNextLine for multiple lines and terminate the input with "end"

Don't use string.split or arrays, just use flow controls, loops and iterations.

The goal is to convert the user input to a special form where:

Input: xy

Output:(tr)(td)xy(/td)(/tr)

Input: x,y,z

Output: (tr)(td)x(/td)(td)y(/td)(td)z(/td)(/tr)

Input: x,,

Output:(tr)(td)x(/td)(td)(/td)(td)(/td)(/tr)

Input: x,y z

Output:(tr)(td)x(/td)(td)y z(/td)(/tr)

output must depends on input where xyz could be jkl or def

Step by Step Solution

3.37 Rating (150 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

To achieve the desired output transformation of the user input we can read the input line by line un... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!