//File:	Rectangle1.h
//Rectangle Implementation
#include <string>
#include "Rectangle1.h"
using namespace std;

Rectangle::Rectangle (double Xul, double Yul, double Xlr, double Ylr, string name)
: Shape (name)
{
	m_xul = Xul;
	m_yul = Yul;
	m_xlr = Xlr;
	m_ylr = Ylr;
}

double Rectangle::width() const
{
	return m_xlr - m_xul;
}

double Rectangle::height() const
{
	return m_yul - m_ylr;
}

double Rectangle::perimeter() const
{
	return 2.0 * (width() + height());
}

double Rectangle::area() const
{
	return width() * height();
}
