Question: int main() { Polar firstPoint, secondPoint, result; double first, second; cout cin >> first >> second; firstPoint.set(first, second); firstPoint.print(); cout cin >> first >> second;

 int main() { Polar firstPoint, secondPoint, result; double first, second; cout

int main()
{
Polar firstPoint, secondPoint, result;
double first, second;
cout
cin >> first >> second;
firstPoint.set(first, second);
firstPoint.print();
cout
cin >> first >> second;
secondPoint.set(first, second);
secondPoint.print();
result = firstPoint.add(secondPoint);
cout
result.print();
return 0;
}
av V W PATEL The point in Cartesian form is (9.32398, 11.75), and in polar form is (15, 0.900014 Problem#2: Create a class called Polar to find the equivalent representation of a Cartesian point in the polar coordinates system Use double variables to represent the private data of the class. Implement all the relevant public member functions (e.g.: set, get, print, ...). Implement the public member function add which does the operation described in problem #1 The following driver produces the given sample of input/output: int main() { Polar firstPoint, secondPoint, result; double first second; cout > first >> second; firstPoint.set(first, second); firstPoint.print(); cout > first >> second; secondPoint.set(first, second): secondPoint.printo: result = firstPoint.add(secondPoint): cout

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!