[Bluej-discuss] web-log analyzer ex 4.33
Aaron Bhatti
aaronizag at hotmail.com
Fri Apr 7 14:59:51 BST 2006
Hello.
I am stuck on the web-log analyzer exercise 4.33(First Edition), where I
have to add a method to find which two hour period is the busiest, and
return the value of the first hour of this period.
I have got this far and I can't think of which step to take next.
Any help would be much appreciated.
public int busiestTwoHour()
{
int first = 0;
int second = 0;
for(int hour = 0; hour < hourCounts.length; hour++)
{
if(hourCounts[hour] > hourCounts[first])
{
first = hourCounts[hour] += hourCounts[hour+1];
}
}
return first;
}
More information about the bluej-discuss
mailing list