Answer:
The abstract class Window:
public abstract class Window
Two integer instance variables, width and height:
private int width, height;
Two accessor methods, getWidth and getHeight:
public int getWidth()
public int getHeight()
A constructor that accepts two integers and uses them to initialize the two instance variables:
public Window(int var1, int var2) {width =var1; height = var2;}
An abstract void-returning method named paint that accepts no parameters
public abstract void paint();
Step-by-step explanation:
Abstract keyword is used with Windows class to make this class an abstract class which means no object can be created using this class.
Two private instance variable width and height. Private means they are not accessible outside this class.
Then getWidth and getHeight methods are used to return width and height.
The constructor takes two integer type variables var1 and var2. These two variable are used to initialize the variables width and height. Constructor has the same name as that of the class.
Method paint() is an abstract method with the return type void which has no parameters.
So here is what the class with all its methods and instance variables looks.
public abstract class Window {
private int width, height;
public Window(int a, int b) {width = a; height = b;}
public int getWidth(){ return width; }
public int getHeight(){ return height; }
public abstract void paint();
}