Question: Add the following method to your Rectangle class: public Rectangle union(Rectangle rect) Returns a new Rectangle that represents the area occupied by the tightest bounding
Add the following method to your Rectangle class:
public Rectangle union(Rectangle rect)
Returns a new Rectangle that represents the area occupied by the tightest bounding box that contains both this Rectangle and the given other Rectangle .
Step by Step Solution
3.47 Rating (160 Votes )
There are 3 Steps involved in it
Returns a new Rectangle that represents the tightest bounding box that ... View full answer
Get step-by-step solutions from verified subject matter experts
