-
Notifications
You must be signed in to change notification settings - Fork 0
/
Event.cs
35 lines (34 loc) · 1.02 KB
/
Event.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace FactoryMethod
{
public abstract class Event
{
//Esta es la clase base, se encarga de leer un archivo de texto y por cada linea crea un objeto de tipo Swimmer
protected int numLanes;
protected ArrayList swimmers;
public Event(string filename, int lanes)
{
numLanes = lanes;
swimmers = new ArrayList();
using (StreamReader sr = new StreamReader(filename))
{
string line;
while ((line = sr.ReadLine()) != null)
{
Swimmer sw = new Swimmer(line);
swimmers.Add(sw);
}
}
}
public abstract Seeding getSeeding();
public abstract bool isPrelim();
public abstract bool isFinal();
public abstract bool isTimedFinal();
}
}