Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //HEADER FILE
- #ifndef RECTANGLE_H
- #define RECTANGLE_H
- class Rectangle:public Shape{
- protected:
- length;
- width;
- public:
- Rectangle(); //constructor
- void setvalues(int l, int w);
- void printvalues();
- };
- __________________________________________________
- // RECTANGLE CPP FILE
- #include "Rectangle.h"
- #include <iostream>
- int a, b;
- Rectangle::Rectangle(){
- length = 0; width = 0;
- }
- void Rectangle::setvalues(int l, int w){
- length = l; width = w;
- }
- a = area();
- b = boundaries(int length, int width);
- cout << "the area of the rectangle is " << a
- <<"the perimeter is "<< b;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement