Comp 152 Project 5: Recursive Programming
Due: Wed April 4th 11:59pm (Thursday April 5th for T/TH students)
Summary: this short lab will give students the chance to practice recursive programming
Details:
Implement the following:
- An ArrayList of Rectangle (java.awt.Rectangle) objects
- as many times as the user wishes
- prompt the user to give you the height and width of the rectangles (lets let the x and y be 0 for all of them)
- create the rectangle and add it to the arrayList based on the Area of the rectangle with smallest rectangles first
- implement a recursive Binary search for a rectangle with a given Area. No loops will be allowed in the binary search
- continue at long as the user wishes
- Allow the users to input an area, use your recursive binary search and print out the height and width of the matching rectangle or if none is found report that it wasn't found.
Extra Requirements:
You must satisfy the following constraints on your program
Your program should be well commented
No
one method may be longer than 25 lines of code long (Lines with
only braces on them don't count. Since comments and white space aren't
code, they do not count either.)
Submitting:
When your program is ready, you need to write a readme.txt file
that provides me the following information:
Your name
The name of your java files (and
the names of any extra non-public classes that are contained in the
file.
The implementation decisions that
you made. Why did you solve the problem the way that you did?
Directions on running and using
your program. Especially anything that might not be the same for all
students. Also tell me what file name you used.
And any problems or bugs left in your program. If your
program doesn't quite work in some situations, tell me about it. If
your program doesn't run or compile, I want to know that before I
try.
When your readme and your code is ready, zip up your files and submit them online as you have done for the recent labs