/********************************** * Assignment 1 * Date: 6-26-2006 * Bryant Yung **********************************/ import java.io.*; import java.util.*; public class HTMLForm extends Orders { /********************************** * Constructor **********************************/ public HTMLForm() { super(); } // end constructor /********************************** * writer * Writes an order summary in html format **********************************/ public void writer() throws IOException{ BufferedWriter pen = new BufferedWriter(new FileWriter("ordersummary.htm")); pen.write(" \n"); pen.write("Order Summary \n"); pen.write("

Order Summary 1997

\n"); pen.write(" \n"); pen.write(" \n"); for(int x=0;x<12;x++) { pen.write(" \n"); pen.write(" \n"); } // end for loop pen.write(" \n"); pen.write("
MonthFreight
" +months[x]+ "" +monarray[x]+ "
Total" +total+ "
\n"); pen.write("
\n"); pen.write(" \n"); pen.write(" \n"); pen.write(" \n"); pen.write("
MaximumMinimum
" +MonMax()+ "" +MonMin()+ "
\n"); pen.close(); String s="ordersummary.htm"; File stupid=new File(s); String st=stupid.getAbsolutePath(); String path=" "+st; File EXP = new File("IEXPLORE.EXE"); String IEpath = " " + EXP.getParent(); System.out.println(IEpath); // Process p=Runtime.getRuntime().exec("C:\\Program Files\\Internet Explorer\\IEXPLORE.EXE" + // path); Process p=Runtime.getRuntime().exec(IEpath + path); } // end of writer }