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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!