#include class Rectangle { Rectangle(float width, float height) : width{width}, height{height} { if (width / height < 2 || height / width < 2) { throw std::logic_error("unresonable side difference"); } } void rotate_90() { float tmp {width}; width = height; height = tmp; } private: float width; float height; };