Unexpected token: (
in
Programming Questions
•
2 years ago
This unfinished sketch is throwing me an 'unexpected token: (' at the ending bracket of setup() and I'm not sure why. Any help would be appreciated.
- Manager manage;
void setup() {
manage = new Manager();
manage.dataparse("api10gtx.txt");
} - class Manager() {
ArrayList Districts = new ArrayList();
ArrayList Schools = new ArrayList();
District currentdistrict;
String[] dump;
Manager() {
}
void dataparse(String loc) {
dump = loadStrings(loc);
Districts = new ArrayList();
for (int i = 0; i < lines.length; i++) {
String stype = dump[i].substring(15,16);
if (stype.equals(1) || stype.equals(2) || stype.equals(3) || stype.equals(4)) { // if district, add to list of districts
District tempd = new District(dump[i].substring(60,90);
Districts.add(tempd);
currentdistrict = tempd;
} else if (stype.equals(H)) { // if high school, add to list of high schools
HighSchool temps = new HighSchool();
temps.name = dump[i].substring(20,60);
temps.2010growth = float(dump[i].substring(117,122));
temps.2009base = float(dump[i].substring(122,127));
temps.asians = float(dump[i].substring(226,233));
temps.total = float(dump[i].substring(110,117));
Schools.add(temps);
}
}
}
} - class District() {
String name;
ArrayList HighSchools = new ArrayList();
District(String n_) {
name = n_;
}
HighSchool addhighschool(String h_) {
HighSchool h = new HighSchool();
h.name = h_;
HighSchools.add(h);
}
} - class HighSchool() {
String name;
float 2010growth;
float 2009base;
float asians;
float scores;
HighSchool() {
}
}
1