Computer Science Resources
Useful Links
- UIL Bytes is a series of instructive videos on topics in UIL Computer Science.
- Oracle Java homepage
- Download Java
- View and download the Java Standard Library Documentation.
- The PC^2 judging environment is a networked judging environment that may be used to judge hands on contests.
IDEs
- The Eclipse IDE (Interactive Development Environment)
- The BlueJ IDE
- The JCreator IDE
- TextPad, not really an IDE, is a text editor with some built in programming capabilities for Syntax highlighting and compiling and running Java programs with keyboard shortcuts.
References
- The Java Language Specification online is one of the official references for UIL Computer Science.
- The Java Tutorial Online
- Java Topic List for UIL Contests
Programming Practice Problems
- Materials from previous UIL contests
- JavaBat. Java bat was designed by Nick Parlante of Stanford University. These are simple programming problems that do not require reading from a file, but are very good for practicing logic, Strings, arrays, decision making and loops. Problems can be written, compiled and checked online.
- Universidad de Valladolid hands on programming problems archive and online judging system.
- The USA Computing Olympiad Training Program Gateway.
- Top Coder is a site that runs many programming contests. Regisration required. Top Coder has a high school specific contest.
- The Computer Contest COMCON is a free contest with participation allowed over the internet.
Teacher Resources and Third Party Practice Materials
- Technomustang.com has 10,000 practice questions from over 40+ areas.
- Blue Pelican Java is an online textbook for high school Computer Science using Java.
- APCentral is for teachers of AP Computer Science. Especially useful are teacher's resources pages found at APCS A Course homepage.
- UIL directory of independent vendors of study and practice materials
Other Contests
- The American Computer Science League
- Best of Texas Contest a distributed contest run over a period of several weeks.
- HP CodeWars, one of the largest one day programming contests in Texas.
- Top Coder is a site that runs many programming contests. Registration required. The practice rooms are especially useful. Top Coder has a high school specific contest. See the link for more details.
- USACO, The USA Computing Olympiad. The USACO holds six Internet Contests during the academic year, and in the late Spring conducts the US Open, a proctored exam.
A Note on Reading From Files
The Scanner class is a member of the Java Standard Library beginning in version 5.0.
Here is a discussion about the ins and outs of using the Scanner class to solve problem number 2 from the 2004 regional programming contest.
- Scanner is in the util package, not the lang package so you need to include the line
import.util.Scanner;
at the top of the class
- To create a Scanner object and connect it to a file you must create a File object based on the name of that file. This can be done with one line;
Scanner s = new Scanner( new File("scores.dat"));
Remember all programs are judged assuming the file is in the same directory as the compiled class file so do not put any path information on the file, just the file name. To use the file class you must include the line
import.io.File;
at the top of your program.
- Unfortunately instantiating a File object can result in in an IOException and this is a checked exception so you either have to use a try-catch block or declare that the method that contains the code that generates the checked exception throws an IOException. In actual programming practice it would be much better to include a try-catch block, but for educational and programming contest purposes it is much easier to simply declare that main throws an IOException. Thus the declaration of the main method looks like this:
public static void main(String[] args) throws IOException
- IOException must also be imported. This can either be done as a separate import statement:
import java.io.IOException;
or since the program now needs multiple classes from the io package we can use the wildcard import. Again, not the best programming practice, but for contests, not a bad idea.
import java.io.*;
Here is problem 2 from the 2004 regional programming portion of the contest solved using the Scanner class.
import java.util.Scanner;
import java.io.File;
import java.io.IOException;
public class scoresScanner
{
public static void main(String[] args) throws IOException
{ String name;
int score;
Scanner s = new Scanner(new File("scores.dat"));
final int NUM_LINES = 5;
for(int i = 0; i < NUM_LINES; i++)
{ score = s.nextInt();
name = s.next();
System.out.println(name + " " + score);
}
}
}