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

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!