//package project1; /* Marcella Wong July 3, 2006 Project 1 */ import java.util.*; import java.io.*; public class HTMLForm extends Orders { public BufferedWriter bw; public HTMLForm() throws IOException { super(); sortFields(); } public void writeFile() throws IOException { bw = new BufferedWriter(new FileWriter("OrdersSummary.html")); bw.write(" \n"); bw.write("Orders Summary"); bw.write(""); bw.write("
\n"); bw.write("

Order Summary

"); bw.write(""); for (int i = 0; i <= 11; i++) { bw.write(""); } bw.write("" + ""); bw.write("" + ""); bw.write("" + ""); bw.write("

Month

Total Freight

" + month(i) + "
$" + getTotalFreight(i) + "
Maximum Month: " + "
" + month(MonMax()) + "
Minimum Month: " + "
" + month(MonMin()) + "

Grand Total:

$" + GrandTotal() + "

"); bw.write("
"); bw.write(""); bw.close(); File name = new File("OrdersSummary.html"); Process p = Runtime.getRuntime().exec("D:\\Program Files\\Internet Explorer\\IEXPLORE.EXE " + name.getAbsolutePath()); } // end writeFile() } // end class HTMLForm