As further clarification, let us use the following names:
d = the distance covered while accelerating
t = the time spent accelerating
L = the seek distance
T = the time spent accelerating and decelerating
t' = the total time spent, including settling
The equation in part a is consistent with these names; the
d and t it talks about are those specified
above. In addition to this equation relating d and
t, you should be able to write two very simple equations,
one relating d to L, and one relating
t to T. Your goal in part a is to take those
three equations and do some algebra to get an equation of the form
T = y L^{1/2}
where y is some constant that can be expressed in terms of
the constant a.
The equation in part b is not consistent with the
above names; what it calls t is really t'. The
given equation is then
t' = x + y
L^{1/2}
which makes sense, because it is saying that the total time,
t' is a constant settling time, x, plus the
acceleration and deceleration time, T. Your job is now,
given two specific pairs of numerical values for t' and L,
to find out what numerical values x and y must have.
Versions of the Server.java, Connection.java, and Client.java files from Figures 15.2-15.4 are in the directory ~max/MC78/2002-Fall/src/chap15/sockets/. (These versions are the ones the authors have made available on their web site. They are not identical to the ones in the book, due to bug fixes.)
First, make sure you understand how to compile and run these programs by doing so. In particular, make sure you can use telnet to access the Server. (You can use the name "localhost" rather than 127.0.0.1, or can telnet using the actual hostname, even from another machine.) Next, modify the Connection.java file (and possibly also the Server.java file) so that the server no longer prints out the date and time, but instead does the following:
Your new server won't be usable with the java Client, just with telnet. Try your new server out. Run it, and then repeatedly telnet to it. (As before, you can do so from different machines, or on the same machine using localhost.) Make sure that each time it reports the line of input that was provided the previous time, except the "First time."
Instructor: Max Hailperin