Listing 6. The StockQuotes classthe client application:
public class StockQuotes
{
public static void main(String[] args)
{
System.out.println();
System.out.println("-- Stock Quote Application --");
System.out.println();
StockData stockData = new StockData();
// register observers...
new TradingFool(stockData);
new BigBuyer(stockData);
// generate changes to stock data...
stockData.setStockData("JUPM",16.10f,16.15f,15.34f,(long)481172);
stockData.setStockData("SUNW",4.84f,4.90f,4.79f,(long)68870233);
stockData.setStockData("MSFT",23.17f,23.37f,23.05f,(long)75091400);
}
}
New on the Java Boutique:
New Review:
Time Management Made Easy with the Quartz Enterprise Job Scheduler
Why not just use the Java timer API? This open source scheduling
API boasts simplicity, ease-of-integration, a well-rounded feature
set, and it's free!
New Applet:
Reverse Complement
Reverse Complement is a simple applet that converts DNA or RNA
sequences into three useful formats.
Elsewhere on internet.com:
WebDeveloper Java
Lots of Java information on webdeveloper.com
WDVL Java
Thorough Java resource at the Web Developer's Virtual Library.
ScriptSearch Java
Hundreds of free Java code files to download.
jGuru: Your View of the Java Universe
Customizable portal with online training, FAQs, regular news updates, and tutorials.
|