Rect(double height, double width);
void ShowSize(const Rect& target);
void ShowDiagonal(const Rect& target);
rect_display.ShowSize(rect01);
rect_display.ShowDiagonal(rect01);
Rect::Rect(double height, double width)
void Rect::height() const
cout << "이 사각형의 높이는 " << this->height_ << "입니다." << endl;
cout << "이 사각형의 너비는 " << this->width_ << "입니다." << endl;
void Display::ShowSize(const Rect& target)
void Display::ShowDiagonal(const Rect& target)
diagonal = sqrt(pow(target.height_, 2) + pow(target.width_, 2));
cout << "이 사각형의 대각선의 길이는 " << diagonal << "입니다." << endl;