Question: This is Eclipse Java Can someone please solve this Eclipse SwapStarsTabs question for me? I am having a hard time with it, thanks! Write a

This is Eclipse Java

Can someone please solve this Eclipse SwapStarsTabs question for me? I am having a hard time with it, thanks!

Write a program that converts all TABS in your code (i.e. the '\t' character) with STARS (i.e. the '*' character and all STARS in your code to TABS.

Input The input will be one or more lines of characters that have been typed in by the user.

Output The output will be exactly the same as the input EXCEPT that all tabs would have been converted to stars and all stars would have been converted to tabs.

Sample Input (TABS are shown by underlining here) _34682**43.3*4234___hhhh**dsfd **** fsfsfdsfsfsd fs _ _ _ _ _ _ _ _ _ _ _ _******_ _ _ _ _ _ jsadg * jsdg dg * ad * asd asjd_df sdgf sdgfs f

Sample Output *34682__43.3_4234***hhhh__dsfd ____ fsfsfdsfsfsd fs * * * * * * * * * * * *______* * * * * * jsadg _ jsdg dg _ ad _ asd asjd_df sdgf sdgfs f NOTE There were some tabs without spaces between them and some with spaces between them. Thats why some *'s have no spaces between them and some have. You can enter a TAB character by pressing the tab key

HINT You need to first convert all tabs in a line to some thing else like say newline or ' '. Then convert all stars in the line to tabs. Then convert all ' ' in the line to stars.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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 Databases Questions!