Question: Please Help ASAP How to Submit Please submit your java source files (answers) to the iCollege 'assignment' drop box for your lab, once you have
How to Submit Please submit your java source files (answers) to the iCollege 'assignment' drop box for your lab, once you have completed. Failure to submit within your given time period will result in a ZERO FOR THIS LAB. NO EXCEPTIONS 1. Write a class called Rectangle that implements the comparable interface. The class should contain three fields: height (int), width (int), topCorner (Point). Write the necessary constructors, accessors, mutators and other methods. The Point class is given below. 2. Write a client class, RectangleClient that creates an ArrayList of ten Rectangle objects called listi. a. Print the list. b. Call Collections.sort(listi), to sort the elements according to the height. If the height of any objects are equal, then sort the list using the width of the rectangle and if the width of any objects are equal, as well, then sort them using the topCorner point (hint: call the Point.compareTo() method). Print the sorted list from the main() method. public class Point implements Comparable
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
