Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Define a struct Point that has two components x and y of type float. Define a class Polygon that has private data members numberOfPoints, length
Define a struct Point that has two components and of type float. Define a class Polygon that has
private data members numberOfPoints, length of type float, a pointer of type Point, and
findLength The class has the public member functions setint get print a parameterized
constructor with a default value, and a copy constructor.
Implement the member functions of the class, including all #include, etc.
Sample inputoutput:
Enter the and coordinates of the points:
The polygon has points and length
Hints
Length should be in c
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started