FileDocCategorySizeDatePackage
Stock.javaAPI DocExample579Thu Oct 24 20:14:24 BST 2002None

Stock

public class Stock extends Object

Fields Summary
String
symbol
double
price
double
delta
Date
lastUpdate
Constructors Summary
public Stock(String s, double p)

      symbol = s;
      price = p;
      lastUpdate = new Date();
    
Methods Summary
public voidprint()

      System.out.println(symbol + ": " + price + " (" + delta 
			 + ") last updated " + lastUpdate);
    
public voidupdate(double d)

      delta = d;
      price += delta;