CMSC 433 - Project 1 - Java exercise
Due Feb. 13, 6:00PM

Part 1 - Counter

Write myCounter, a counter class. It should support the following functionality:

public class myCounter {
    Integer getNextID();
    }

Part 2 - Timestamper

Write myTimestamper, a timestamping class. It should support the following functionality:

public class myTimestamper {
    java.util.Date getTimestamp();
    }

Part 3 - Logging server and Logging client

Write myLoggingServer and myLoggingClient, server and client classes that support the following functionality:

public class myLoggingServer {   
    myLoggingServer(int port, java.io.Writer outStream);
    void writeRecord(String record);           
    String getRecords(long windowSize);
    void flush();
}
public class myLoggingClient {
    myLoggingClient(InetAddress host, int port);
    void writeRecord(String ID, String timestamp, String event);
    void viewRecords(long windowSize);
    void flush();
}

Details

Here is driver code that we will use to test your classes: ProducerConsumerTest.java, Producer.java, Consumer.java, and CubbyHole.java .  For these drivers, sample contents for the client viewRecords() window is here , and sample output for the server flush() command is here .  Note that your output will not match exactly because of thread behavior and values of timestamps.

Submission details

Submission will be handled using the submit program as project 1 (i.e. submit 1 *.java).

Web Accessibility