| Homework 7DetailsWeblog Analyzer
- Part 1
In Section 7.4, finish exercises 7.12 through 7.18.
-
Part 2
-
Then read ex. 7.19 and do the following:
-
Add a field to the LogAnalyzer class named dayCounts.
It should be an array of type int, and have enough slots for each day of the month.
Modify the analyzeHourlyData method so that it also tracks how many accesses were
logged each day of the month. (You don't need to add a separate method named analyzeDailyData,
just track both the hourly counts and the daily counts in analyzeHourlyData).
-
Then write methods printDailyCounts, busiestDay and quietestDay similar to
printHourlyCounts, busiestHour and quietestHour.
-
-
Part 3
Finally, create a class named LogDemo that creates a LogAnalyzer,
and invokes the busiestTwoHours, printDailyCounts, busiestDay, and quietestDay methods
and prints out the return values for the busiest two hour period, busiest day and quietest day.
-
Part 4
Make sure to Javadoc every class and method, regardless of whether or not you made any changes.
This includes putting your name and the date in each class you created/modified,
having a brief description of what each class does, having a brief description of
what every method (including constructors) does, and @param and @return tags everywhere
they are appropriate.
When you have completed this assignment, select "Create Jar File ..." from the File menu in BlueJ.
Check "include source" and "include Bluej project files".
Save the file with the name bassett-loganalyzer.jar (except use your name instead of bassett).
Then upload the "jar" file into Moodle no less than 10 minutes before the start of class.
|