labtest1
Class GoldPrice

java.lang.Object
  extended by labtest1.GoldPrice

public class GoldPrice
extends Object

This utility class provides gold prices.


Field Summary
static double GRAMS_PER_TROY_OUNCE
          Number of grams per troy ounce.
 
Method Summary
static double get(int days)
          Returns the price of one troy ounce of gold the given number of days ago.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

GRAMS_PER_TROY_OUNCE

public static final double GRAMS_PER_TROY_OUNCE
Number of grams per troy ounce.

See Also:
Constant Field Values
Method Detail

get

public static double get(int days)
Returns the price of one troy ounce of gold the given number of days ago. For example, if the given number is zero, then today's price is returned.

Parameters:
days - number of days ago.
Precondition:
days >= 0
Returns:
the price of one troy ounce of gold the given number of days ago.