Assignment 6
Managing Concurrency

Assignment

Due at the beginning of class on Wednesday, October 22

Preparation

Use the same program from last week, found here.

Recall that this program works as follows

What you did last week

To Do this week

Using Java features for synchronizing threads, modify the program so that the output file will look like the input file in every case.  Note that the purpose is NOT to rewrite the program in some fashion so that it works, but rather to leave the program design as is, but add synchronization structures to ensure that the resulting output file is guaranteed to have no anomalies.

To Turn In

Turn in this information:

  1. Your program with the code that you added highlighted.
  2. A description of what this modification does to ensure that synchronization is ensured.