icatalin

POO LAB2 Rectangle.h

Oct 16th, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.82 KB | None | 0 0
  1. #pragma once
  2.  
  3. #include <vector>
  4. #include <iostream>
  5.  
  6. class Rectangle
  7. {
  8.    
  9. public:
  10.     Rectangle(int width = 0, int height = 0)
  11.     Rectangle(const Rectangle& rectangle);
  12.  
  13.     void SetWidth(const int width);
  14.     int GetWidth() const;
  15.  
  16.     void SetHeight(const int width);
  17.     int GetHeight() const;
  18.  
  19.     friend bool operator==(const Complex& first, const Rectangle& second);
  20.     bool operator!=(const Rectangle& second) const;
  21.  
  22.     friend std::istream& operator>>(std::istream& stream, Rectangle& rectangle)
  23.     friend std::ostream& operator<<(std::ostream& stream, const Rectangle& rectangle)
  24.  
  25. private:
  26.     int m_width;
  27.     int m_height;
  28. };
  29.  
  30. bool operator==(const Complex& first, const Rectangle& second)
  31. std::istream& operator>>(std::istream& stream, Rectangle& rectangle);
  32. std::ostream& operator<<(std::ostream& stream, const Rectangle& rectangle);
Add Comment
Please, Sign In to add comment