I am making a graphing library in Java (I know there are plenty out there already).
I have an abstract class "Graph" which has variables for width and height and methods to draw the scale and an abstract method to draw the graph. I have multiple classes which extend the Graph class such as LineGraph, BarGraph etc which have a method to draw the graph.
As the width and height of a graph need to be set when a new instance of a graph is created I would like to do it in the constructor but when I tried Eclipse still wanted me to make a separate constructor in each class. Is it possible to have an abstract class with a constructor and how would you do it?