Yurttas/PL/OOL/Java/F/09/02/01/00/Event.java

From ZCubes Wiki
Revision as of 16:21, 7 November 2013 by MassBot1 (talk | contribs) (Created page with "<syntaxhighlight lang="java" line start="1" enclose="div">import java.util.*; public abstract class Event { protected int numLanes; protected Vector swimmers; public ...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
 1import java.util.*;
 2
 3public abstract class Event {
 4
 5  protected int numLanes;
 6  protected Vector swimmers;
 7
 8  public Event(String filename, int lanes) {
 9    numLanes = lanes;
10    swimmers = new Vector();
11    //read in swimmers from file
12    InputFile f = new InputFile(filename);
13    String s = f.readLine();
14    while(s != null) {
15      Swimmer sw = new Swimmer(s);
16      swimmers.addElement(sw);
17      s = f.readLine();
18    }
19    f.close();
20  }
21
22  public abstract Seeding getSeeding();
23  public abstract boolean isPrelim();
24  public abstract boolean isFinal();
25  public abstract boolean isTimedFinal();
26
27}