This is what I have so far.
I am just stuck on my method int numTrades(), I have to return the current number of trades from the array.
//Fields double lastPChange; double dailyPrices[]; int numberOfDaysWithData; public void addTrade(double price) { dailyPrices[numberOfDaysWithData] = price; numberOfDaysWithData = numberOfDaysWithData + 1; this.numberOfDaysWithData++; lastPChange = (numberOfDaysWithData - 2); } public void numTrades() { dailyPrices[numberOfDaysWithData] return; }