Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Need Help completing these codes. I have most of the code written down need assistance with this portion of the code. Thank you!! Create a
Need Help completing these codes. I have most of the code written down need assistance with this portion of the code. Thank you!!
Create a Part 3 subpackage p3 under the ca5 package and copy here all the classes from subpackage p2. In the Shape class in the p3 subpackage, modify the compareTo method so that shapes with larger areas precede shapes with smaller areas. In the Shape class, modify the maxAreaShape2 method so that it uses the modified compareTo method and still returns the shape in the input list with the largest area. Run the same main method of the ShapeTest class in the p3 subpackage. What do you observe of the list of shapes after sortingStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started