Class Picture

All Implemented Interfaces:
DigitalPicture

public class Picture extends SimplePicture
A class that represents a picture. This class inherits from SimplePicture and allows the student to add functionality to the Picture class. Copyright Georgia Institute of Technology 2004-2005
  • Constructor Details

    • Picture

      public Picture()
      Constructor that takes no arguments
    • Picture

      public Picture(int width, int height)
      Constructor that takes a file name and creates the picture
      Parameters:
      fileName - the name of the file to create the picture from
    • Picture

      public Picture(Picture copyPicture)
      Constructor that takes a picture and creates a copy of that picture
    • Picture

      public Picture(BufferedImage image)
      Constructor that takes a buffered image
      Parameters:
      image - the buffered image to use
  • Method Details

    • toString

      public String toString()
      Method to return a string with information about this picture.
      Overrides:
      toString in class SimplePicture
      Returns:
      a string with information about the picture such as fileName, height and width.