CSc 2310 Principles of Computer Programming I
Spring 1999
Programming Assignment #5
Due: 5 April 1999 (Monday)
A:> java WebURL Enter URL: http://tinman.cs.gsu.edu The URLs mentioned in the Web page http://tinman.cs.gsu.edu are: http://www.cs.gsu.edu http://www.gsu.edu/ http://www.accessatlanta.com/ http://www.peachnet.edu/guide/ http://wings.buffalo.edu/world/usa.html http://tinman.cs.gsu.edu/~raj/oradoc http://tinman.cs.gsu.edu:9001/ows-doc/index.htm http://java.sun.com/products/jdbc/html-0120/packages.html http://tinman.cs.gsu.edu/~raj/msqldoc/manual.html http://tinman.cs.gsu.edu/~raj/sqljdoc/ug.htm http://tinman.cs.gsu.edu/~raj/osjidoc http://tinman.cs.gsu.edu/~raj/osidoc/manual.html http://tinman.cs.gsu.edu/~raj http://tinman.cs.gsu.edu/~matggbx http://tinman.cs.gsu.edu:9001/matlntx/plsql/main_page http://tinman.cs.gsu.edu/~raj/books/oracle-primer.html http://www.amazon.com/exec/obidos/ASIN/0201357534/002-8465435-3334227
http://www.nba.com/bulls/roster.htmlA sample run of the program is shown below.
A:> java WebNBA Enter Team Name (in lower case; e.g. bulls): hawks Head Coach is Lenny Wilkens The roster is: Mookie Blaylock ( Oklahoma '89) Tyrone Corbin ( DePaul '85) Chris Crawford ( Marquette '97) LaPhonso Ellis ( Notre Dame '92) Ed Gray ( California '97) Alan Henderson ( Indiana '95) Anthony Johnson ( Charleston (SC) '97) Grant Long ( Eastern Michigan '88) Roshown McLeod ( Duke '98) Dikembe Mutombo ( Georgetown '91) Jeff Sheppard ( Kentucky) Steve Smith ( Michigan State '91) Mark West ( Old Dominion '83)
For both these problems, you need to use the class WebAccess.java, which you should include in your ohjava directory. This class is available from the course Web page. This class has a public class method:
public static String getHTMLContent(String urlString)which can be used as follows:
String htmlString = WebAccess.getHTMLContent(s);where s is a string variable whose value is a valid URL. After getting the HTML content of a URL, you should process the string to extract the necessary information.