All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class pinball.log.BallStats

java.lang.Object
   |
   +----pinball.log.BallStats

public class BallStats
extends Object
Find the statistics for the balls in play.


Variable Index

 o ball
The ball number.
 o balls
The balls that were in play.
 o hits
Number of hits for the ball.
 o output
File that will get the data.
 o time
Time in play for the ball.

Constructor Index

 o BallStats(PrintWriter)
Creates the statistics for the balls in play.

Method Index

 o check(String)
Analyzes the ball's information.
 o process(StringTokenizer)
Finds how long a ball was in play and the number of hits for it.
 o writeInfo()
Writes the information about the balls to the output file.

Variables

 o output
 private PrintWriter output
File that will get the data.

 o ball
 private int ball
The ball number.

 o time
 private long time
Time in play for the ball.

 o hits
 private int hits
Number of hits for the ball.

 o balls
 private Vector balls
The balls that were in play.

Constructors

 o BallStats
 public BallStats(PrintWriter p)
Creates the statistics for the balls in play.

Parameters:
p - the file to write the output to.

Methods

 o process
 public void process(StringTokenizer tokens)
Finds how long a ball was in play and the number of hits for it.

Parameters:
tokens - the line of tokens to process.
 o check
 private void check(String data)
Analyzes the ball's information. Finds how long a ball was in play and the number of hits for it. data the line from the log file.

 o writeInfo
 public void writeInfo()
Writes the information about the balls to the output file.


All Packages  Class Hierarchy  This Package  Previous  Next  Index