0

I am trying to set the endpoints of a trapezoid, square, etc. For example: TRX (top right x) is 2 and TRY (top right y) is 2, so the top right point is at (2,2). I am wondering how to use the variables in the subclass with the given hierarchy:

public class Quadrilateral {
    private int TRX, TLX, BRX, BLX;
    private int TRY, TLY, BRY, BLY;

    public static void main(String[] args) {
    }
}

class Trapezoid extends Quadrilateral {
}

class Square extends Quadrilateral {
}
Conspicuous Compiler
  • 6,403
  • 1
  • 40
  • 52
user1914650
  • 83
  • 3
  • 12

0 Answers0