#include "rectangle.h" //default rectangle::rectangle(){ h = new int; w = new int; *h = 12; *w = 4; } //nondefault rectangle::rectangle(int a, int b){ h = new int; w = new int; *h = a; *w = b; } //copy rectangle::rectangle(const rectangle &obj){ h = new int; w = new int; *h = *obj.h; *w = *obj.w; } rectangle::~rectangle(){ delete h; delete w; } rectangle& rectangle::operator=(const rectangle &rhs){ *h = *rhs.h; *w = *rhs.w; return *this; } int rectangle::geth(){ return *h; } void rectangle::seth(int a){ *h = a; } int rectangle::area(){ return *h**w; }