title: how to override an abstract method in a subclass?
body: <p>I have to create subclasses for an abstract parent class which print out shapes, however whenever I try to create an object it keeps telling me that I cannot instantiate an abstract class, and when I remove the keyword <code>abstract</code> from my code that overrides, it says I can't do that either.</p>
  
  <p>My code:</p>
  
  <pre><code>public class Rectangle extends VectorObject {
      protected int ID, x, y, xlnth, ylnth;
      protected int matrix[][];
  
      Rectangle(int id, int ax, int ay, int xlen, int ylen) {
          super(id, ax, ay);
          xlnth = xlen;
          ylnth = ylen;
      }
  
      public int getId() {
          return ID;
      }
  
      public void draw() {
          String [][] matrix = new String[20][20];
          for (int i = 0; i &lt; 20; i++) {
              for (int j = 0; j &lt; 20; j++) {
                  if (i == x) {
                      matrix[i][y] = "*";
                  }
                  if (j==y) {
                      matrix[i][y] = "*";
                  }
                  System.out.println(matrix[i][y]);
              }
          }
      }
  }
  </code></pre>
  
  <p>Abstract parent class:</p>
  
  <pre><code>abstract class VectorObject {
      protected int id, x, y;
  
      VectorObject(int anId, int ax, int ay) {
          id = anId;
          x = ax;
          y = ay;
      }
  
      int getId() {
          return id;
      }
  
      void setNewCoords(int newx, int newy) {
          x = newx;
          y = newy;
      }
  
      public abstract void draw (char [][] matrix);
  }
  </code></pre>