pop quiz soln from network course written in java (2009?)