Java Reference
In-Depth Information
Here is a rewrite of the
TwoDShape
and
Triangle
classes that uses methods to access the
private instance variables
width
and
height
: