Can anyone help me create functions for doing this 1) three bool methods onCircl
ID: 3619588 • Letter: C
Question
Can anyone help me create functions for doing this1) three bool methods onCircle (Point *), outofCircle (Point *), and inCircle (Point *) for a Circle object C (so C->onCircle (P) for a point P means the point P lies on the circle C (i.e. the distance of P to the center of C is equal to the radius of C).
2) three bool method intersect (Circle *), tangent (Circle *), and disjoint (Circle *) to check if two circles intersect (in two points), are tangent (intersect in exactly one point), or are disjoint (do not intersect). For example, if we have Circle *C1, *C2; and Point *P; then C->inCircle (P) is true means point P is in the circle C; C1->intersect (C2) is true means circle C1 and C2 intersect.
3) Provide test cases for points on, inside, and outside a circle. Also provide cases for circles intersecting, tangent, and disjoint.
Explanation / Answer
¸«p!@Y!R
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.