Class Stripes

java.lang.Object
  extended byStripes
All Implemented Interfaces:
Picture

public class Stripes
extends java.lang.Object
implements Picture

You must implement this class as described in the description for Homework #3. Note that it currently returns dummy values to avoid compiler errors.


Constructor Summary
Stripes(int width, int height)
           
 
Method Summary
 PictureColor getColor(int x, int y)
          This specifies the content of a picture by returning the color of the picture at each pixel (i.e., position).
 int getHeight()
           
 int getWidth()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Stripes

public Stripes(int width,
               int height)
Method Detail

getColor

public PictureColor getColor(int x,
                             int y)
Description copied from interface: Picture
This specifies the content of a picture by returning the color of the picture at each pixel (i.e., position).

Specified by:
getColor in interface Picture
Parameters:
x - The column within the picture
y - The row within the picture
Returns:
The color of the picture at the specified location

getWidth

public int getWidth()
Specified by:
getWidth in interface Picture

getHeight

public int getHeight()
Specified by:
getHeight in interface Picture