#include "Rectangle.h" Rectangle::Rectangle(int x1, int y1, int x2, int y2) :uprl(x1, y1), lowr(x2, y2){} std::pair Rectangle::getUprl(){ return uprl; } std::pair Rectangle::getLowr(){ return lowr; } void Rectangle::setUprl(int x, int y){ uprl.first = x; uprl.second = y; } void Rectangle::setLowr(int x, int y){ lowr.first = x; lowr.second = y; } bool Rectangle::contains(std::pair p){ return (p.first >= uprl.first && p.second >= uprl.second && p.first <= lowr.first && p.second <= lowr.second); }