Question: Write a JAVA program that reads any string of length 5 and prints all substrings of the string. Your program should contain 15 output statements
Write a JAVA program that reads any string of length 5 and prints all substrings of the string. Your program should contain 15 output statements which build the substrings and output the result. (without using loops!)

Task Write a JAVA program that reads any string of length 5 and prints all substrings of the string. Your program should contain 15 output statements which build the substrings and output the result. For example if abcde is entered by the user for the string, your program should build all 15 substrings and print them in this order: a ab abc abcd abcde b bc bcd bcde cd cde d de e Next, your program will also read any integer of 5 digits and print all sub-numbers of the integer. For example if 12345 is entered as input, your program should build all 15 numbers and print them in this order: 1 12 123 1234 12345 2 23 234 2345 3 34 345 4 45 5 Note: You are NOT allowed to convert the integer input to a string in this second part of the program. You must work with it as an integer to generate your output. Make sure your project and class inside that project are named Lab2FirstnameLastname using your actual first and last names. Additional Assignment Requirements 1. You are NOT allowed to use a loop or decision statement or any other concept not yet learned in this course. 2. You may NOT discuss this problem with your classmates. This lab is independent work. Work copied from another student or an online resource will result in enforcement of EKU's Academic Integrity policy as discussed in the syllabus. 3. You must use appropriate spacing, indention, naming conventions, and documentation in your Java program. 4. You will upload your completed work by attaching your Lab2FirstnameLastname.java to your submission in Blackboard for the lab assignment. If you need help locating your .java file to submit, refer to the FAQ discussion board for help or reach out to your lab assistant/instructor for help. DO NOT submit the entire project folder to be graded
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
