![]() | |
Project 3: Assigned: Fri Mar 21 2025 One of your eccentric pals in the department has assigned all of their friends 2-dimensional coordinates based on two values that they think are important. (Probably fan levels of some important brands like My Little Pony and Rainbow Brite.) After finishing their list, they want to know which two of their friends are the finest, which is the two with the lowest Euclidean distance between them. You think of an obvious brute-force algorithm and promise to implement it for them. Unfortunately, you had no idea just how many friends they had... Part 0, 0 points: Look at the instructions below to organize your code to simplify the submission process. Part 1, 0 points: Create FriendsFinder.java, and add a static method, Part 2, 0 points: Add a JavaDoc comment header to describe your project and list who is in your team. Additionally, add a method to your class,
Part 3, 0 points: You'll need these files in order to run the tester: Part 4, 100 points: Your grade will be based on the longest friend lists where you can correctly find the closest friends in a restricted amount of time. Here is FriendsFinderTester.java, which will run your code on increasingly larger lists of points. It does not test the correctness of larger lists of friends, due to run time constraints. (If you submit it to me, I will be able to check the validity.) Important notes:
Part 5, 0 points: I highly recommend that you start with the brute-force method to solve this. That will get you some of the points on this project and will help you understand how to write the code and use the java.awt.Point class, while the algorithm itself is quite easy to implement. Part 6, 0 points: A divide-and-conquer algorithm exists for this project, but it is not straightforward, as you might imagine. I expect that I will cover this algorithm in class. If you are having trouble implementing the divide-and-conquer version, please come ask me questions! Part 7, 0 points: I expect that you'll need to use multiple threads to earn maximum points in the project. Hint: the computer I'm grading on has 16 CPUS. Submitting your Project: The files I'm looking for in this project are: |