/*This code was generated using the UMPLE modeling language! Date of generation: 2008/07/31 09:07:56*/ /*This class drives: */ package Shapes.core; import Shapes.*; import Shapes.json.*; public class Rectangle extends SimplePolygon { //Class datatypes private String height; private String width; //Class association variables //Registry of our system. ShapesRegistry registry = ShapesRegistry.getInstance(); //Constructor public Rectangle(String aCenter, String aOrientation, String aHeight, String aWidth) { super(aCenter, aOrientation); height = aHeight; width = aWidth; } public boolean setHeight(String aHeight) { height = aHeight; return true; } public boolean setWidth(String aWidth) { width = aWidth; return true; } public String getHeight() { return height; } public String getWidth() { return width; } public void delete() { } public boolean areManyEndsNull() { return true; } /*********************************** * Returns the attribute list along with the * class ID in JSON format. ***********************************/ public JSONObject getAttributes() throws JSONException { JSONObject obj = new JSONObject(); obj.put("CLASS_ID", registry.getKey(this)); obj.put("height", getHeight()); obj.put("width", getWidth()); return obj; } }