/* +---------------+ | ImageFile | +---------------+ | String name | | int width | | int height | | String kind | +---------------+ */ //to represent an image file public class ImageFile { public String name; public int width; public int height; public String kind; public ImageFile(String name, int width, int height, String kind){ this.name = name; this.width = width; this.height = height; this.kind = kind; } /* TEMPLATE: ... this.name ... -- String ... this.width ... -- int ... this.height ... -- int ... this.kind ... -- String ... this.sameImageFile(ImageFile) ... -- boolean */ // is this image file the same as the given one? public boolean sameImageFile(ImageFile that){ return this.name.equals(that.name) && this.width == that.width && this.height == that.height && this.kind.equals(that.kind); } }