# Fractals!

From Huben's Wiki

Many sorts of fractals require complex numbers to calculate. The above Mandelbrot function, for example. Today's exercise is to build enough of a complex class to run a fractal browser. You will only need to write about 7 methods.

Complex numbers have real and imaginary parts, which you should represent as double fields in your class. You should be able to remember how to add and multiply them from Algebra and Precalc: if not, ask for help.

- Download https://dl.dropboxusercontent.com/u/20086520/AP%20Comp%20Sci/fractal.zip and unzip it.
- Load it all into DrJava.
- Add a class Complex, as described below:

package fractal; public class Complex { // three constructors needed: // no arguments // one Complex argument (copy constructor) // two arguments (real and imaginary values) // you will also need two accessors // you will need to be able to multiply and add complex numbers }

- DO NOT CHANGE ANY OF THE DOWNLOADED CODE! It is correct.
- Look at the error messages as you try to compile: they tell you which methods are missing from your Complex class.
- Add the needed methods.
- When it works, you should be able to plot beautiful fractals.