Your task is to write Java statements which initialise an array of arrays of booleans to one of four specified pattern.
The applet below already contains these statements.
Use it has a model for what you have to do.
Note, you do not have to write the applet or any graphics code!
The file you must modify is named Patterns.java.
You will insert your statements into this file.
Save it in your lab5 directory and edit it.
Note the comments indicating where you should place your comments, declarations and code.
Note there is already code present in Patterns.java to create a plus pattern. The spiral pattern is part of the optional exercise. You must add statements which initialise the array of arrays of booleans to the other four patterns: X, crosshatch, chessboard, and rings.
Note, the variables size and patternName. patternName is of type String and contains the name of the pattern. size is of type int and contains the size of the array.
You can not run the code in Patterns.java directly.
When you have inserted your statments into Patterns.java and compiled it successfully, you can use some classes in the subject account to test your code.
The classes PatternDisplay , pattern.htm and PatternCanvas together will graphically display the patterns created by your code in Patterns.java