Conditionals: Asterisks

Screen Shot 2014-10-02 at 10.05.29 AM

Asterisks Pattern
If you are finished with yesterday’s programming assignment, work on the following assignment.
Write a program, Asterisks_YI.java that prints the following pattern separately, one below the other each pattern separated front he next by one blank line. Use nested for loops ONLY to generate the patterns. All asterisks (*) should be printed by a single statement
which causes the asterisks to print side by side separated by a space.
Hint: The last two patterns require that each line begin with an appropriate number of blanks.

Extra Credit: Combine your code from the four separate problems into a single program that prints all four patterns side by side by making clever use of nested for loops. For all parts of this program – minimize the number of statements that print these characters.
asteriskspattern

/**
 * 4 patterns using asterisks
 * Basic program to start with
 * It draws a square of asterisks
 *
 * @mrs.e
 * @11/19/19
 */
public class Asterisks
{
    public static void main(String args[])
    {
        for (int i = 0; i < 10; i++)
        {
            for (int j = 0; j < 10; j++)
            {
                System.out.print("* ");
            }
            
            System.out.println();                   
        }
    }
}

* * * * * * * * * * 
* * * * * * * * * * 
* * * * * * * * * * 
* * * * * * * * * * 
* * * * * * * * * * 
* * * * * * * * * * 
* * * * * * * * * * 
* * * * * * * * * * 
* * * * * * * * * * 
* * * * * * * * * *