Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Write a recursive method that takes as a parameter a nonnegative integer and gen

ID: 3584299 • Letter: W

Question

Write a recursive method that takes as a parameter a nonnegative integer and generates the following pattern of stars. If the nonnegative inter is 4, then the pattern generated is: **** *** ** * * ** *** **** Also, write a program that prompts the user to enter the number of lines in pthe pattern and ises the recursive method to generate the pattern. For example, specifying the number of lines to be 4 generates the preceding pattern. I need it to be in java language, so far this is what I have that generates the above pattern. However, Im having trouble on the second part of the problem. public class Stars { public void printStars(int num, int ct, boolean desc) { if (desc) { for (int i=0; i

Explanation / Answer

void yourMethod(int first, int starsToWrite, bool add) { if (starsToWrite
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote