Package algs12
Class MyRecursiveRectangles
java.lang.Object
algs12.MyRecursiveRectangles
For this assignment, you must do two things:
1. Complete the MyRectangle class at the bottom of this file. It is not a
public class, but don't worry about that. I've put two classes in one file so
that you need only hand in a single file.
In particular, you should get the testEquals method to work without throwing
any exceptions.
2. Modify the draw method of MyRecursiveRectangles so that it behaves as
demonstrated here:
http://fpl.cs.depaul.edu/jriely/ds1/extras/RecursiveRectangles.mp4To do this only requires very minor modifications to the function. It is not necessary, but if you want to learn more about the drawing classes, see here:
http://fpl.cs.depaul.edu/jriely/ds1/code/doc-public/stdlib/StdDraw.html http://introcs.cs.princeton.edu/java/15inout/
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
static void
static int
randomByteAbove
(int i) static int
randomByteBelow
(int i) static Color
static Color
static Color
static void
-
Field Details
-
VARIANCE
- See Also:
-
DIM
- See Also:
-
-
Constructor Details
-
MyRecursiveRectangles
public MyRecursiveRectangles()
-
-
Method Details
-
randomColor
-
randomByteAbove
-
randomByteBelow
-
randomColorLight
-
randomColorDark
-
draw
-
testEquals
-
main
-