Answer to Question #312445 in C++ for Rishab Roy

Question #312445

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


1
Expert's answer
2022-03-16T07:09:18-0400

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);
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment