Back to slide -- Keyboard shortcut: 'u'  previous -- Keyboard shortcut: 'p'  next -- Keyboard shortcut: 'n'          constructors-point-rectangle/boiled-down-for-notes-cpp11/rect.h - The Rectangle class.Lecture 4 - slide 5 : 40
Program 3

// Constructors in class Rectangle - more or less the same as in class Point.

#include "point.h"

class Rectangle{
private:
  Point upper_left, lower_right;

public:
  Rectangle();
  Rectangle(Point p1, Point p2);
  Rectangle(double x1, double y1, double x2, double y2);
 
  // other methods
};