Menu

(Solved) : C Need Code Program 4 Files Pointcpp File Contain Implementations Functions Include Functi Q43944055 . . .

In C++ we need to code this program with these 4 files

Point.cpp (this file should contain theimplementations of your functions and should include functioncomments)

Point.h (this file should contain thedefinition of your class, don’t forget a header guard!)

main.cpp (this file should include filecomment)

Makefile (this file should have a target “all”,a target “main”, and a target “clean”. The “main” target shouldproduce an executable from your main.cpp called “main”)

Your Point class will define a 2 dimensional point (a point withan x, and y coordinate). It should have two constructors: one thattakes 0 parameters and creates a point at the origin, and one thattakes an x and a y value and creates a point at the givencoordinates. It should have getter andsetter methods for each coordinate and twomethods, Distance, to calculate the Euclidiandistance between this Point and another, andTranslate, which moves all of this Pointscoordinates by whatever integer value is passed to the method.*Note that Distance and Translate are methods of the Pointclass.*

Your main function should create at least three points,calculate the distance between them, and report their coordinatesand the calculated distances between them to the user. Do notprompt the user for the coordinates of the Points that youcreate.

Your main function should then translate one of the Points thatyou’ve created by a positive amount, then report the newcoordinates and calculated distances to the user. It should thentranslate the same Point by a negative amount (this amount does notneed to be the same as the positive amount), then report the newcoordinates and calculated distances to the user.

Expert Answer


Answer to In C++ we need to code this program with these 4 files Point.cpp (this file should contain the implementations of your f…

OR