-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.java
72 lines (64 loc) · 2.67 KB
/
test.java
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
import java.io.*;
import java.util.*;
import com.gargoylesoftware.htmlunit.html.HtmlButton;
import com.gargoylesoftware.htmlunit.html.HtmlForm;
import com.gargoylesoftware.htmlunit.html.HtmlPage;
import com.gargoylesoftware.htmlunit.html.HtmlSpan;
import com.gargoylesoftware.htmlunit.html.HtmlElement;
import com.gargoylesoftware.htmlunit.WebClient;
import com.gargoylesoftware.htmlunit.html.HtmlSelect;
import org.apache.pdfbox.pdmodel.PDDocument;
import org.apache.pdfbox.text.PDFTextStripper;
import org.apache.pdfbox.text.PDFTextStripperByArea;
public class test{
public static void main (String [] args) throws Exception{
ArrayList <Counties> counties = new ArrayList <Counties>();
Counties fairfax = new Counties ("Fairfax");
counties.add(fairfax);
Counties arlington = new Counties ("Arlington");
counties.add(arlington);
Counties henrico = new Counties ("Henrico");
counties.add(henrico);
Counties PrinceWilliam = new Counties("Prince William");
counties.add(PrinceWilliam);
Counties fauquier = new Counties("Fauquier");
counties.add(fauquier);
Counties prince = new Counties ("Prince William");
counties.add(prince);
Counties george = new Counties ("Prince George");
counties.add(george);
Counties king = new Counties ("King George");
counties.add(king);
Counties culpeper = new Counties ("Culpeper");
counties.add(culpeper);
Counties hanover = new Counties ("Hanover");
counties.add(hanover);
Counties frederick = new Counties ("Frederick");
counties.add(frederick);
Counties clarke = new Counties ("Clarke");
counties.add(clarke);
Counties westmoreland = new Counties ("Loudoun");
counties.add(westmoreland);
Counties mathews = new Counties ("Mathews");
counties.add(mathews);
Counties caroline = new Counties ("Caroline");
counties.add(caroline);
Scanner in = new Scanner (System.in);
EthnicityRecorder r = new EthnicityRecorder();
/**
* Records ethnicities into each county
*/
r.setEthnicityCount(counties);
/**
* Uploads docuemnt of studentFunding pdf file, copies and reads data from pdf to text file
*/
PDDocument document = PDDocument.load(new File("C:\\Users\\hyma2\\Documents\\1st Semester Classes\\Java\\Project\\perStudentFunding.pdf"));
PDFReader p = new PDFReader();
p.recordPDF(document, in);
/**
* Makes studentFunding file using its path and sets per student funding of each county
*/
File studentFunding = new File("C:\\Users\\hyma2\\Documents\\1st Semester Classes\\Java\\Project\\perStudentFunding.txt");
p.recordPerStudentFunding(counties, studentFunding, in);
}
}