HW 11 Grading Guide


  1. (30 points)
    1. (20 points) Test and make sure it works
      1. The scoreboard is appropriately printed every 2 seconds
      2. The final queue of contestants is appropriately printed
    2. (10 points) Your discretion. Scan the code and make sure everything appears in order. Pay attention to the TimeKeeper class and make sure they synchronized the proper methods and did not synchronize unnecessary methods. Deduct a couple points for being too aggressive with synchronization.

  2. (10 points) 5 points for each part. Their answer should be consistent with the data structure they used. You can award partial credit at your discretion.

  3. (60 points)
    1. (45 points) Test and make sure it works
      1. The chat rooms are listed in alphabetical order when a client connects and the participants in each room are listed in the order they entered the room.
      2. You are able to add yourself to a chat room
      3. If you enter an unlisted chat room, you are continuously prompted for a chat room until you enter an appropriate one
      4. When a user enters a chat room, all other users in the chat room are notified of the arrival.
      5. Lines from a user are broadcast to all other users in the chat room.
      6. When a user leaves the chat room, all other users in the chat room are notified of the departure.
    2. (15 points) Your discretion. Scan the code and make sure that it roughly follows the structure I outlined in class.
      1. A main chat server that loops, accepts client connections, and forks server threads to handle each client.
      2. A server thread for each client that receives input and forwards the information to a chat room object.
      3. A chat room object that distributes messages to individuals in the chat rooms. There should be one chat room object per chat room. Having one chat room object for the entire application could result in unnecessary client blocking if two server threads from different chat rooms try to get to the chat room object simultaneously.
      4. A client-side program that connects to the server and handles reading from stdin and the socket in an appropriate fashion (probably with the main thread dealing with one of the input streams and a second thread dealing with the other input stream).