Thanks everyone for the help. I finished the program and got it working. Here is what I ended up with. If anyone has suggestions or tips, please let me know.
My code:
import java.io.Console;
import java.util.*;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.*;
public class Project{
public static void main(String[] args)
throws FileNotFoundException, IOException
{
// Initializing Variables.
int length = 0;
String[] line = {};
// Just for looks.
System.out.println("\n" + (char)178 + (char)178 + (char)178 + (char)178 + (char)178 + (char)178 + (char)178
+ (char)178 + (char)178 + (char)178 + (char)178 + (char)178 + (char)178 + (char)178 + (char)178 + (char)178
+ (char)178 + (char)178 + (char)178 + (char)178 + (char)178 + (char)178 + (char)178 + (char)178 + (char)178
+ (char)178 + (char)178 + (char)178 + (char)178 + (char)178 + (char)178 + (char)178 + (char)178 + (char)178 + "\n");
// Reading the number of grades and the actual grades from the file.
BufferedReader inputFile = new BufferedReader(new FileReader("test.txt"));
length = Integer.parseInt(inputFile.readLine());
while (inputFile.ready()) {
line = inputFile.readLine().split("\\s+");
}
// Vectors for each range of grades .
// [0-24]
Vector A = new Vector(100);
// [25-49]
Vector B = new Vector(100);
// [50-74]
Vector C = new Vector(100);
// [75-99]
Vector D = new Vector(100);
// [100-124]
Vector E = new Vector(100);
// [125-149]
Vector F = new Vector(100);
// [150-174]
Vector G = new Vector(100);
// [175-200]
Vector H = new Vector(100);
// This one if for any number that happens to not fit within a category.
Vector I = new Vector(100);
// For loop that repeats the program.
for (int j = 0; j < length; j++) {
// Initializing NewGrade Variable.
int NewGrade = Integer.parseInt(line[j]);
// Logic for categorizing the grades.
if (0 <= NewGrade && NewGrade <= 24) {
A.addElement(new Integer(NewGrade));
}
else if (25 <= NewGrade && NewGrade <= 49) {
B.addElement(new Integer(NewGrade));
}
else if (50 <= NewGrade && NewGrade <= 74) {
C.addElement(new Integer(NewGrade));
}
else if (75 <= NewGrade && NewGrade <= 99) {
D.addElement(new Integer(NewGrade));
}
else if (100 <= NewGrade && NewGrade <= 124) {
E.addElement(new Integer(NewGrade));
}
else if (125 <= NewGrade && NewGrade <= 149) {
F.addElement(new Integer(NewGrade));
}
else if (150 <= NewGrade && NewGrade <= 174) {
G.addElement(new Integer(NewGrade));
}
else if (175 <= NewGrade && NewGrade <= 200) {
H.addElement(new Integer(NewGrade));
}
else {
I.addElement(new Integer(NewGrade));
}
}
// Printing the groups of grades out to the screen.
System.out.println("[0 - 24]: " + A.size());
System.out.println("[25 - 49]: " + B.size());
System.out.println("[50 - 74]: " + C.size());
System.out.println("[75 - 99]: " + D.size());
System.out.println("[100 - 124]: " + E.size());
System.out.println("[125 - 149]: " + F.size());
System.out.println("[150 - 174]: " + G.size());
System.out.println("[175 - 200]: " + H.size());
// Just for looks.
System.out.println("\n" + (char)178 + (char)178 + (char)178 + (char)178 + (char)178 + (char)178 + (char)178
+ (char)178 + (char)178 + (char)178 + (char)178 + (char)178 + (char)178 + (char)178 + (char)178 + (char)178
+ (char)178 + (char)178 + (char)178 + (char)178 + (char)178 + (char)178 + (char)178 + (char)178 + (char)178
+ (char)178 + (char)178 + (char)178 + (char)178 + (char)178 + (char)178 + (char)178 + (char)178 + (char)178);
}
}