uni

Thing1's amazing uni repo
Log | Files | Refs

Shape.java (557B)


      1 import java.awt.*;
      2 import java.awt.geom.*;
      3 
      4 public class Shape {
      5 	private int x;
      6 	private int y;
      7 	private String color;
      8 	private boolean isVisible;
      9 
     10 	public Shape() {
     11 		x = 30;
     12 		y = 30;
     13 		color = "blue";
     14 		isVisible = true;
     15 	}
     16 
     17 	public String toString() {
     18 		return "x: " + x +
     19 			", y: " + y +
     20 			", color: " + color +
     21 			", visible: " + isVisible;
     22 	}
     23 
     24 	public int getX() {
     25 		return x;
     26 	}
     27 
     28 	public int getY() {
     29 		return y;
     30 	}
     31 
     32 	public String getColor() {
     33 		return color;
     34 	}
     35 
     36 	public boolean getVisible() {
     37 		return isVisible;
     38 	}
     39 
     40 	public void draw() {}
     41 };