Create the classes, righttriangle and rectangle


Create the classes, RightTriangle and Rectangle, each of which is a derived class from the abatract class ShapeBase in Display 8.19. Then derive a class Square from the class Rectangle. Each of these three derived classes will have two additional methods to calculate area and circumference, as well as the inherited methods. Do not forget to override the methoddrawHere. Give your classes have a reasonable complement of constructors and accessor methods. The square class should include only one dimension, the side, and should automatically set the height and width to the length of the side. You (just as a Rectangle object, as discussed in this chapter, won't look square). Write a driver program that tests all your methods.

Request for Solution File

Ask an Expert for Answer!!
Basic Computer Science: Create the classes, righttriangle and rectangle
Reference No:- TGS089164

Expected delivery within 24 Hours