Exploring some OOP code, and basic UML diagrams

To load the project in to IntelliJ:

  1. Use the File -> New -> Project From Version Control -> Git menu.
  2. Paste in the following URL: https://github.com/sdp-resources/chat.git
  3. Click “Clone”. You should now be looking at the project.
  4. Select “VCS -> Git -> Branches”, then pick the origin/simpleClassStructure option, and then “Checkout as..”, then hit OK.
  5. At the bottom of the screen there should be a “Maven projects need to be imported” pop-up. Click “Enable Auto-import”.
  6. Navigate into the chat/source/main/java folder in the project pane on the left. You should see 4 classes.

Task 1

Your first task in this activity is to produce a UML diagram describing these classes and their relations.

Task 2

Now in a new area on the board, do the same work for a slightly changed version of the code. To see that version, go to the “VCS -> Git -> Branches” menu, and pick the origin/basicClassStructure option and then “Checkout as..”. Then compare and contrast the two different structures. What are their differences? What do you think of that?

Task 3

Consider the following: We want to expand our application so that there are multiple kinds of message-like notifications, instead of just the current ChatMessages. For example we might want a notification to show up when someone leaves or when someone joins, or we might want “video messages” rather than text messages. How might our application change to accomodate that, and which classes would be affected by this change?