Assignment IV: Mini LinkedIn

Submission

This is one of 4 options for Assignment IV: Application.

Please zip your entire directory and submit it via moodle by Monday 4/30 at 11:59pm.

Mini LinkedIn

Using a graph, create a mini LinkedIn application. The goal of this assignment is to go from a high-level description of the application to a working implementation, so these instructions are purposely not going to outline what specific classes, methods, etc. to have.

Expected behavior and requirements

Using the command line or a GUI, allow the user to:

  • create users
  • connect a pair of users
  • given a user, display their connections
  • query the relationship between a pair of users
    • if they are connected, indicate so
    • otherwise, provide a shortest path between them or indicate that there is no path of connections linking them

Create documentation (at the very least a basic README.txt file) that explains what your program does and how to use it.

Process

Here are some tips for how to create this program.

  1. Come up with your design:
    1. From the user perspective
      1. What does the expected interaction with the program look like? This is sometimes called storyboarding.
    2. From the implementation perspective
      1. What classes do you need?
      2. For each class, what properties and methods do you need?
        1. For the methods, write a javadoc comment and method declaration for the expected behavior/interaction.
  2. Create the skeleton files for your classes with stubs for methods.
  3. For each method:
    1. Write pseudocode for how to implement the expected behavior dictated by the javadoc comment.
    2. Your pseudocode becomes comments which you then implement with lines of code
  4. Test and debug!

Implementation hints

  • use your Assignment III: Graphs implementation or ask me for solutions
  • modify the breadth-first traversal method to annotate each vertex with the parent and discovery times, using the pseudocode from CLRS as a guide
  • use the modified breadth-first traversal to find a shortest path between from one user to another
  • create a JUnit test or sample application that tests your implementation
    • include an image of your social network to help verify the connections