Create a class called Polar for performing Polar coordinates. Define all the necessary variables to represent the private part. Provide a constructor that enables an object of this class to be initialized when it's declared. Provide any method that you believe it is needed. Furthermore, provide methods that perform each of the following A. Operator +. This function adds two polar points. R= The summation of their distance while Theta = The biggest angle between the two points. B. Operator -. This functions calculates the angle between two polar points. Write a program to test your class. Define an array of objects with size 5 by using the memory allocation technique and fill it with data. (a) Use the function + to add the 1- and the 3" polar points. (b) Use the function – to find the difference between the 2 and the 4 polar points angles.

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter11: Inheritance And Composition
Section: Chapter Questions
Problem 9PE
icon
Related questions
Question
Create a class called Polar for performing Polar coordinates. Define all the necessary variables to represent the private part. Provide a constructor that enables an object of this class to be initialized when it's declared. Provide any method that you believe it is needed. Furthermore, provide methods that perform each of the following A. Operator +. This function adds two polar points. R= The summation of their distance while Theta = The biggest angle between the two points. B. Operator -. This functions calculates the angle between two polar points. Write a program to test your class. Define an array of objects with size 5 by using the memory allocation technique and fill it with data. (a) Use the function + to add the 1" and the 3 polar points. (b) Use the function - to find the difference between the 2 and the 4 polar points angles. In C++
Create a class called Polar for performing Polar coordinates. Define all the necessary
variables to represent the private part. Provide a constructor that enables an object of
this class to be initialized when it's declared. Provide any method that you believe it is
needed.
Furthermore, provide methods that perform each of the following
A. Operator +. This function adds two polar points. R= The summation of their
distance while Theta = The biggest angle between the two points.
B. Operator -. This functions calculates the angle between two polar points.
Write a program to test your class.
Define an array of objects with size 5 by using the memory allocation
technique and fill it with data.
(a) Use the function + to add the 1 and the 3" polar points.
(b) Use the function - to find the difference between the 2 and the 4 polar
points angles.
Transcribed Image Text:Create a class called Polar for performing Polar coordinates. Define all the necessary variables to represent the private part. Provide a constructor that enables an object of this class to be initialized when it's declared. Provide any method that you believe it is needed. Furthermore, provide methods that perform each of the following A. Operator +. This function adds two polar points. R= The summation of their distance while Theta = The biggest angle between the two points. B. Operator -. This functions calculates the angle between two polar points. Write a program to test your class. Define an array of objects with size 5 by using the memory allocation technique and fill it with data. (a) Use the function + to add the 1 and the 3" polar points. (b) Use the function - to find the difference between the 2 and the 4 polar points angles.
Expert Solution
steps

Step by step

Solved in 3 steps with 4 images

Blurred answer
Knowledge Booster
Class
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT