Do NOT do in Semester 2, 2012.
Data Struct Assignment #6
Friend Finder
OVERVIEW:
You will create a Java application similar to (but much simpler than) Facebook’s “Friend Finder” application. Note: You do NOT need to know anything about Facebook for this assignment.
BACKGROUND:
Now that you know to create an array, store and retrieve items in an array, and iterate (loop) through an array, you are ready to have some fun searching an array! Facebook has an application called “Friend Finder” that allows you to “friend” new people based on your profile.
INSTRUCTIONS:
For this assignment, you will be using the file FriendFinder.java (available from Pickup/CTS Courses/Computing Science 20/Arrays (Data Structures)/). Open the file and skim through it before reading on.
Part 1: Ashley’s Friends Search:
You want to search Ashley’s friends for a name and find out his/her likes.
PART 2: Friend Finder for Bryan:
Currently, Ashley and Bryan only have one friend in common: Carmen. In this part of the assignment, you need to suggest new friends for Bryan by comparing the likes of Bryan’s current friends with the likes of Ashley’s friends.
Bryan and Carmen should NOT be suggested as friends. /1 Each time you find a “like” that Bryan and Ashley’s friends have in common, suggest that friend of Ashley’s to Bryan./2
If the user accepts this friend suggestion:
If the user rejects this friend suggestion, no changes are made to the above variables. /1
If the user types “EXIT” as input instead of accepting or rejecting a friend, your program should exit. /1
NOTES (final 10%):
Total: /18
SAMPLE PROGRAM RUN:
Part 1:
Please enter a name to search for:
Carmen
Carmen is a friend of Ashley's
Part 2:
Friend Suggestion: Doug
Doug likes: math as does your friend Darby
Would you like to accept Doug? (y/n)
y
Bryan's current friends:
1. Ashley
2. Bobbi
3. Carmen
4. Darby
5. Eddie
6. Fiona
7. Gillian
8. Hope
9. Ida
10. Jake
11. Kevin
12. Lilly
13. Mel
14. Doug