Inheritance

You will create a Square and a Triangle Class, 
Triangle is a child class of Square

add code to the main to test your classes like the example 
a Makefile has been provided for you

your classes will be as follows
File: Square.h 


    // the Square class will contain


    // data members

  protected:/**/
    double length;


    // functions

  public:/**/
    Square();
    /* set lenght to 0 */


    Square(double);
    /* set length to parameter, use you function to validate 1 */


    ~Square();
    /* just log start & end */


    void SetLength(double);
    /* set length to value passed in , if value is less than zero set length to 0 */


    double Area();
    /* return the area,  (length * length) */


    string ToString();
    /* return a formatted string like the example */


  };/**/



File: Triangle.h



    // the Triangle class will contain


    //data members

  protected:/**/
    double height;

    //functions

  public:/**/
    Triangle();
    /* set height to 0 ( use Setheight  ), length should be set in Square constructor */


    Triangle(double, double);
    /*
    set length to value one passed in
    set height to value two passed in
    use SetLength and Setheight
    */


    ~Triangle();
    /* just log start & end */

    void SetHeight(double );
    /* set height to value passed in , if value is less than zero set height to 0 */


    double Area();
    /* return the area,  (-5. (length * height)) */

    string ToString();
    /* return a formatted string like the example */

  };/**/


------------------------------------------------------------------------------