// Goals of this code to teach recursion and compare to iteration
// Review:  static methods, polymorphic methods, debugging methods

import java.io.*;

public class Stars {
	

public static void writeStars(int n)
     // iterative function that produces an output line of exactly n stars
{
  for (int i = 0; i < n; i++)
    System.out.print("*");
  // System.out.println("Done with for loop");
}

public static void writeStars2(int n)
     // recursive function that produces an output line of exactly n stars
{
  if (n <= 0)
    // System.out.println("Base case we will stop!");
    System.out.println();
  else {
    System.out.print("*");
    writeStars2(n - 1);
  }
}


public static void main ( String[] args ) {
	
	// Stars examples
	writeStars(5);
    writeStars2(5);
	
	
}

}
	
