Problem

In the Triangle (and ColoredTriangle) code in Section 4.7, we say two Triangles t1 and t2...

In the Triangle (and ColoredTriangle) code in Section 4.7, we say two Triangles t1 and t2 are equal only if they have equal values in their corresponding instance variables.   But shouldn ’t two Triangles be considered equal as long as they have the same three corner point values regardless of which instance variable stores which value?   For example, what if, for Triangles t1 and t2, it were the case that t1.p1 == t2.p1, t1.p2 = t2.p3, and t1.p3 = t2.p2?   Shouldn ’t the Triangles be considered equal in that case as well?

Step-by-Step Solution

Request Professional Solution

Request Solution!

We need at least 10 more requests to produce the solution.

0 / 10 have requested this problem solution

The more requests, the faster the answer.

Request! (Login Required)


All students who have requested the solution will be notified once they are available.
Add your Solution
Textbook Solutions and Answers Search
Solutions For Problems in Chapter 4
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT