write a Java program that will prompt for and read one word of length greater than 3 entered by the user and display the substrings of the the reverse word without the second and second to the last character, then dropping the last character of the substrings at every iteration. You should also alternate between displaying the resulting substrings in upper and lower case, starting with upper case. Be sure to use the same format and wording as in the samples run in the table below.
write a Java program that will prompt for and read one word of length greater than 3 entered by the user and display the substrings of the the reverse word without the second and second to the last character, then dropping the last character of the substrings at every iteration. You should also alternate between displaying the resulting substrings in upper and lower case, starting with upper case. Be sure to use the same format and wording as in the samples run in the table below.
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...
Related questions
Question
write a Java
the substrings of the the reverse word without the second and second to the last character, then dropping the last character of the substrings at every iteration. You should also alternate between displaying the resulting substrings in upper and lower case, starting with upper case. Be sure to use the same format and wording as in the samples run in the table below.
![You can use the loop of your choice to solve the problem. You are not allowed to use arrays.
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 bleu) 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
Enteroao word:4
Enteroaoword:
Danield
COMP2484
Hereoare othe substrings oof linD:4
Here are the o substrings oof 82PMC:4
LIND
82PMC4
line
82pme
LIA
82P
14
824
Niceoone!
Nice one!
Enteroa word:
Enteroaoword:
monTReale
OMIcrone
Here areothe o substrings oofoleRTnm:4
Here areo the osubstrings oofonrcIO:4
LERTNME
NRCIO4
lertne
nrcie
LERT
NRC
lere
nre
LE
Ne
14
Niceoone!
Nice one!
Note 1: You are to expect a perfect user who will always enter one word of length greater than 3, 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.](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2Fd3be9fc5-49dc-4987-93dc-30b0d6519ab7%2F88bf0791-ecf9-4114-862e-b03d282404b1%2Fx1umbl_processed.png&w=3840&q=75)
Transcribed Image Text:You can use the loop of your choice to solve the problem. You are not allowed to use arrays.
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 bleu) 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
Enteroao word:4
Enteroaoword:
Danield
COMP2484
Hereoare othe substrings oof linD:4
Here are the o substrings oof 82PMC:4
LIND
82PMC4
line
82pme
LIA
82P
14
824
Niceoone!
Nice one!
Enteroa word:
Enteroaoword:
monTReale
OMIcrone
Here areothe o substrings oofoleRTnm:4
Here areo the osubstrings oofonrcIO:4
LERTNME
NRCIO4
lertne
nrcie
LERT
NRC
lere
nre
LE
Ne
14
Niceoone!
Nice one!
Note 1: You are to expect a perfect user who will always enter one word of length greater than 3, 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
![](/static/compass_v2/shared-icons/check-mark.png)
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 2 steps
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
Recommended textbooks for you
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
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…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
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)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
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…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
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)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
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](https://www.bartleby.com/isbn_cover_images/9781337093422/9781337093422_smallCoverImage.gif)
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
![Prelude to Programming](https://www.bartleby.com/isbn_cover_images/9780133750423/9780133750423_smallCoverImage.jpg)
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
![Sc Business Data Communications and Networking, T…](https://www.bartleby.com/isbn_cover_images/9781119368830/9781119368830_smallCoverImage.gif)
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY