FileDocCategorySizeDatePackage
Stock.javaAPI DocExample478Tue Aug 25 11:39:08 BST 1998None

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;