Question: c++ using classes 6. Consider the point class discussed in the lecture. Add to the class a member function named getQuadrant that takes no argument

c++ using classes
c++ using classes 6. Consider the point class discussed in the lecture.

6. Consider the point class discussed in the lecture. Add to the class a member function named getQuadrant that takes no argument and returns one of the integers 1, 2, 3 or 4 which is the quadrant in 2D space where the point is found. If the point is at the origin or one of its coordinates is 0.0, then return 0. Write a main program to test your getQuadrantmember function. In your main program create few default and non-default Point objects and print their quadrants by calling getQuadrant member function

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!