Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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

Graph Databases

Authors: Ian Robinson, Jim Webber, Emil Eifrem

1st Edition

1449356265, 978-1449356262

More Books

Students also viewed these Databases questions