Write the source code file
Square.cpp
. Include necessary header files and implementation of each member function of the following
Square
class.
class Square
{
public:
Square(double initial_length, string initial_color);
double get_length() const;
string get_color() const;
double get_area() const;
private:
double length;
string color;
};
The area of a square is length x length.