Question
(please send full program) (do not write on note book) (compile DevC++ compiler before send ) Coord03 Add another member function to your Coord class
(please send full program)
(do not write on note book)
(compile DevC++ compiler before send )
Coord03
Add another member function to your Coord class
Start with the Coord02.cpp from the previous assignment (Coord02). Rename the .cpp file Coord03.cpp
Leave the class name in the program as Coord
Write a member function named
int distBetweenPoints(const Coord &obj)
that calculates the distance from the calling object to the x, y, z points of the Coord object passed to your function
Distance between points is a rounded int
d = sqrt(pow((getXPoint() obj.getXPoint()), 2) +
pow((getYPoint() obj.getYPoint()), 2) +
pow((getZPoint() obj.getZPoint()), 2));
this member function cannot be included in the display() function
upload code and test plan
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