Problem: Write a Java program that will prompt for and read one word entered by the user, and generate its reverse, then create a new word which contains the first letter of the word, the first letter of the reverse word, followed by the second character of the word, followed by the second character of the reverse word, and so on, as pictured in the figure below: word Gabriel |GlaebirribealG new word reverse word IeirbaG You can use the loop of your choice to solve the problem. You are not allowed to use arrays. Be sure to use the same format and wording as in the sample run in the table below. You can use the loop of your choice to solve the problem. Based on the previous specifications your program should behave and look exactly as shown in the cases below. Your

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
100%
Problem: Write a Java program that will prompt for and read one word entered by the user, and generate its reverse, then
create a new word which contains the first letter of the word, the first letter of the reverse word, followed by the second
character of the word, followed by the second character of the reverse word, and so on, as pictured in the figure below:
word
Gábriel
ĞlaebirribealG new word
reverse word
leirbag
You can use the loop of your choice to solve the problem. You are not allowed to use arrays.
Be sure to use the same format and wording as in the sample run in the table below.
You can use the loop of your choice to solve the problem.
Based on the previous specifications your program should behave and look exactly as shown in the cases below. Your
program should work for any word entered by the user, not just the ones in the samples.
Note that in the output • symbol is a space and e is a new line character. All words except for user input (in green) must be
exactly as indicated in the sample outputs. Any extra "spaces" and/or "new lines" will be graded a wrong answer.
Program Sample outputs
Enteroone oword:4
Advised
The onewowordo is AedsviivsdeAd
Whatoao mosaic oword!
Enteroone oword:4
Anxietyd
The onewowordo is AyntxeiiextnyAd
Whatoaomosaic oword!
Enteroone oword:4
absoluted
The onewowordo is aebtsuolloustbead
Whatoaomosaicoword!
Note 1: You are to expect a perfect user who will always enter 1 word with a length greater than 1; that is, do not verify the
validity of user input.
Note 2: The use of libraries other than java.util.Scanner is prohibited. Your program must work for any string values
entered, not just the ones in the samples above.
Note 3: Final thought, remember that your solution is space-sensitive and fulfill the above instructions carefully and precisely.
Transcribed Image Text:Problem: Write a Java program that will prompt for and read one word entered by the user, and generate its reverse, then create a new word which contains the first letter of the word, the first letter of the reverse word, followed by the second character of the word, followed by the second character of the reverse word, and so on, as pictured in the figure below: word Gábriel ĞlaebirribealG new word reverse word leirbag You can use the loop of your choice to solve the problem. You are not allowed to use arrays. Be sure to use the same format and wording as in the sample run in the table below. You can use the loop of your choice to solve the problem. Based on the previous specifications your program should behave and look exactly as shown in the cases below. Your program should work for any word entered by the user, not just the ones in the samples. Note that in the output • symbol is a space and e is a new line character. All words except for user input (in green) must be exactly as indicated in the sample outputs. Any extra "spaces" and/or "new lines" will be graded a wrong answer. Program Sample outputs Enteroone oword:4 Advised The onewowordo is AedsviivsdeAd Whatoao mosaic oword! Enteroone oword:4 Anxietyd The onewowordo is AyntxeiiextnyAd Whatoaomosaic oword! Enteroone oword:4 absoluted The onewowordo is aebtsuolloustbead Whatoaomosaicoword! Note 1: You are to expect a perfect user who will always enter 1 word with a length greater than 1; that is, do not verify the validity of user input. Note 2: The use of libraries other than java.util.Scanner is prohibited. Your program must work for any string values entered, not just the ones in the samples above. Note 3: Final thought, remember that your solution is space-sensitive and fulfill the above instructions carefully and precisely.
Expert Solution
steps

Step by step

Solved in 5 steps with 2 images

Blurred answer
Similar questions
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY