A quadrilateral is represented by having Dimensions L and B units. Write a program to create two objects. Initialize one using default constructor and other using parameterized Constructor. Find out the perimeter of the quadrilateral and print it
Here is my program:
class Quadriateral
{
public:
Quadriateral(int L , int B)
{
this->L = L;
this->B = B;
}
private:
int L;
int B;
};
int main()
{
Quadriateral quad();
Quadriateral quad2(3, 4);
}
Comments
Leave a comment