CSE 132 (Spring 2009)
Lab 4a: FLAP


Using the design you came up with in Studio 7 (which is available on the lab table), implement the flap package.

Your desing must include the following classes, all in the flap package:

ClientSignonFrame(String username)
constructor: represents the version of a signon frame sent from the client to the server. This class should probably extend ClientFrame.
ServerSignonFrame()
constructor: represents the signon frame sent to client from server. This class should probably extend ServerFrame.
ServerDataFrame(String s)
constructor: represents a data frame received from the server. This class should probably extend ServerFrame.
ClientDataFrame(String s)
constructor: makes a frame for sending from client to server. This class should probably extend ClientFrame.
FLAPInputStream(InputStream)
Decorates (does not extend!) the InputStream by adding the method ServerFrame readFrame().

The Java decoraters extend FilterInputStream -- if this helps you, then do that, but you don't have to.

FLAPOutputStream(OutputStream)
Decorates (does not extend!) the OutputStream by adding the method void writeFrame(ClientFrame f). You may need other methods as well (for example, to write "FLAPON\r\n\r\n")

There is no demo or submission of this part, but you will need it for next week's work.
Thanks to Matt Gokel for providing the following: