CS 348 - Homework 3 - Due Wednesday Feb 23

Write a Java JDBC application that allows the user to type a select query for our parts and suppliers database and have it generate an HTML table or a Swing GUI JTable. You don't have to do both of these, just pick one.

Requirements

  1. I should be able to run the program from the command line.
  2. The input query comes from standard input (System.in) and can span multiple lines for long queries. Assume that a semicolon at the end of a line ends the query.
  3. If you choose to generate a JTable the table should display on the screen and be nicely formatted with column headers, etc. For example, the following should pop up a JTable on the display.
        java Main < input.sql
      
  4. If generating HTML the output should go to standard output (System.out) so that it can be redirected to a file that I can then open in the browser. For example, the following should work:
        java Main < input.sql > output.html; firefox output.html
      
  5. Name your Java project HW3 in your folder on the T: drive. Also, name your class that has the main method Main.
  6. The program is due at the start of class on Wednesday Feb 23.