Question: Write your Java program named StarPatternYourName as follows. The main method prompts the user to enter a number of rows. Then passes the input string

 Write your Java program named StarPatternYourName as follows. The main method

Write your Java program named StarPatternYourName as follows. The main method prompts the user to enter a number of rows. Then passes the input string to method printPattern(...) to recursively print the pyramid stars. You can use recursive helper method if you need it. Also, you can add more methods. Format the outputs as follows. Not only for 5, 7, your program should run correctly with the other integers. Enter Number of Rows: 5 x *** ******* ********* Try Again? (Y/N): Y Enter Number of Rows: 7 * *** ***** ********* *********** ************* Try Again? (Y/N): N Please carefully think about these. Recursion to care about the number of spaces (left side of pyramid) and stars. Recursion to care about the number of stars of each line. (1, 3, 5, 7 .... stars) Recursion to care about the number of lines. You may need additional methods. If you use loops in printPattern and the other methods (except main method loop to retry), you will not get a full credit

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!