Question
c++ , code it for begineer When reading in a set of points from the file, write some code which determines which shape the set
c++ , code it for begineer
When reading in a set of points from the file, write some code which determines which shape the set of points should belong to (yes, squares are types of rectangles, but if you read points which form a square, use the square class). When the proper shape is determined, initialze that class using those points. Once you have completed this, call the area and perimeter member functions of your classes and print these values to the terminal.(shapes to be considered square rectangle and triangle from the given points)
file1:
0,0
2,0
0,2
2,2
file2:
0,0
2,0
1,1
file3:
0,0
2,0
0,4
2,4
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