Assume the existence of a Window class with a method getClientAreaHeight that returns an integer representing the height of the portion of the window that an application program can use for its display. Assume also, a subclass BorderedWindow with an integer instance variable borderSize, that represents the size of the border around the window. Override the getClientAreaHeight in BorderWindow to return the client area height as returned by the superclass minus the border size (taking into account top and bottom borders).

LANGUAGE: JAVA

CHALLENGE:

Assume the existence of a Window class with a method getClientAreaHeight that returns an integer representing the height of the portion of the window that an application program can use for its display. Assume also, a subclass BorderedWindow with an integer instance variable borderSize, that represents the size of the border around the window. Override the getClientAreaHeight in BorderWindow to return the client area height as returned by the superclass minus the border size (taking into account top and bottom borders).

SOLUTION:

The Bad News: The content you are trying to access is only available to members.

The Good News: You too can be a member, simply Click Here.

Already a member?

Posted in ,