public class FigureFactory
extends Object
A factory for creating a new Figure.
-
Method Summary
Modifier and Type |
Method |
Description |
static Figure |
figure() |
Creates a new figure.
|
static Figure |
figure(int numRows,
int numCols) |
Creates a new figure.
|
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Method Details
-
Creates a new figure.
- Returns:
- new figure
-
public static Figure figure(
int numRows,
int numCols)
Creates a new figure.
- Parameters:
numRows
- number or rows in the figure grid.
numCols
- number or columns in the figure grid.
- Returns:
- new figure