java.lang.ObjectPicture
public class Picture
This class represents a simple picture. You can draw the picture using the draw method. But wait, there's more: being an electronic picture, it can be changed. You can set it to black-and-white display and back to colors (only after it's been drawn, of course). This class was written as an early example for teaching Java with BlueJ.
| Constructor Summary | |
|---|---|
Picture()
Constructor for objects of class Picture |
|
| Method Summary | |
|---|---|
void |
draw()
Draw this picture. |
String |
getSunPositions()
// Returns the position of the two suns // |
void |
setBlackAndWhite()
Change this picture to black/white display |
void |
setColor()
Change this picture to use color display |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Picture()
| Method Detail |
|---|
public void draw()
public String getSunPositions()
public void setBlackAndWhite()
public void setColor()