Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Design Using Entity Relationship Diagrams

Authors: Sikha Saha Bagui, Richard Walsh Earp

3rd Edition

103201718X, 978-1032017181

More Books

Students also viewed these Databases questions