⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 hour08_1a.hpp

📁 C++学习的有利助手
💻 HPP
字号:
 // Begin rect.hpp
 // You will need to rename this file to rect.hpp
 #include <iostream>

 // point has been removed to its own file:
 #include "point.hpp"

 class  Rectangle
 {
 public:
     Rectangle (int top, int left, int bottom, int right);
     ~Rectangle () {}

     int GetTop() const { return itsTop; }
     int GetLeft() const { return itsLeft; } 
     int GetBottom() const { return itsBottom; } 
     int GetRight() const { return itsRight; }

     Point  GetUpperLeft() const { return itsUpperLeft; }
     Point  GetLowerLeft() const { return itsLowerLeft; }
     Point  GetUpperRight() const { return itsUpperRight; }
     Point  GetLowerRight() const { return itsLowerRight; }

     void SetUpperLeft(Point Location);
     void SetLowerLeft(Point Location);
     void SetUpperRight(Point Location);
     void SetLowerRight(Point Location);

     void SetTop(int top);
     void SetLeft (int left);
     void SetBottom (int bottom);
     void SetRight (int right);

     int GetArea() const;

 private:
     Point  itsUpperLeft;
     Point  itsUpperRight;
     Point  itsLowerLeft;
     Point  itsLowerRight;
     int    itsTop;
     int    itsLeft;
     int    itsBottom;
     int    itsRight;
 };
 // end Rect.hpp

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -