Define two derived classes of the abstract class shapebase


Question: Define two derived classes of the abstract class ShapeBase. Your two classes will be called Rig htArrow and LeftArrow. These classes will be like the dasses Rectangle and Tri angle, but they will draw arrows that point right and left, respectively. For example, the following arrow points to the right: The size of the arrow is determined by two numbers, one for the length of the 'tail" and one for the width of the arrowhead. (The width is the length of the vertical base.) The arrow shown here has a length of 16 and a width of 7. The width of the arrowhead cannot be an even number, so your constructors and mutator methods should check to make sure that it is always odd. Mite a test program for each dass that tests all the methods in the dass. You can assume that the width of the base of the arrowhead is at least 3.

530_3.png

Solution Preview :

Prepared by a verified Expert
Basic Computer Science: Define two derived classes of the abstract class shapebase
Reference No:- TGS02457193

Now Priced at $15 (50% Discount)

Recommended (91%)

Rated (4.3/5)