

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
Material Type: Notes; Professor: Hanks; Class: Intro to Programming in Java; Subject: Computer Science Info Systems; University: Fort Lewis College; Term: Winter 2005;
Typology: Study notes
1 / 3
This page cannot be seen from the preview
Don't miss anything!
Announcements: Homework on course web site – due Friday Programming assignment due next Monday Reading: 4.1 to 4.6 (pp 79-86) Discuss appropriate indenting – if statements, for loops, blocks
sum += theArray[i]; balance += salesTax; // Also =, /=, -=, %= Can do this with String concatenation also: String s = ""; for ( int = 0; j < 20; j++ ) { s += ""; } Web-Log analyzer Let's look at the web-analyzer project. This project is supposed to be a very simple version of a web-site traffic analyzer. Web sites keep a record of all the pages that have been accessed, and then the owners can analyze the data to look for trends. This class examines files where each line in the file represents an access to the web site. Each line in the file contains five numbers: year month day hour minute. For example: 2005 06 23 03 17. Look at LogAnalyzer class. Where is the array declared? Where is it allocated? Right now, the Analyzer class only uses the hour value from the log files. It has methods to count the number of access that occur in each hour, and print out those numbers. Let's look at the methods. What do they do? Mention while loop. Discuss abstraction again – we're using some methods in LogReader and LogEntry classes. Discuss the statement hourCounts[hour]++;