Define a derived class  WindowWithBorder that contains a single additional integer  instance variable  named  borderWidth, and has a constructor  that accepts an integer  parameter  which is used to initialize  the instance variable.

LANGUAGE: C++

CHALLENGE:

Assume  the existence of a Window class  with a function getWidth that returns the width of the window. Define a derived class  WindowWithBorder that contains a single additional integer  instance variable  named  borderWidth, and has a constructor  that accepts an integer  parameter  which is used to initialize  the instance variable . There is also a function getUseableWidth, that returns the width of the window minus the width of the border.

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 ,