Question: Construct a class named Coord containing two double-precision data members named xval and yval, used to store the x and y values of a point
Construct a class named Coord containing two double-precision data members named xval and yval, used to store the x and y values of a point in rectangular coordinates. The class functions should include constructor and display functions and a friend function named convPol(). The convPol() function should accept two double-precision numbers representing a point in polar coordinates and convert them into rectangular coordinates. For conversion from polar to rectangular coordinates, use these formulas:
x=r Cos 0
y= r Sin 0
Include the class into a working program and exercise all functions.
Plz, use a C++ code
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
