Class Picture

java.lang.Object
  extended by Picture

public class Picture
extends Object

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.

Version:
2006.03.30/2007.01.30
Author:
Michael Kolling and David J. Barnes, mod.by Denis BUREAU

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

Picture

public Picture()
Constructor for objects of class Picture

Method Detail

draw

public void draw()
Draw this picture.


getSunPositions

public String getSunPositions()
// Returns the position of the two suns //


setBlackAndWhite

public void setBlackAndWhite()
Change this picture to black/white display


setColor

public void setColor()
Change this picture to use color display