Uploaded by cobif11370

assignment 1

advertisement
Assignment 1
Weight: 15% of your final grade
Due: after Unit 7
Please refer to the units of the Study Guide on Moodle and the Instructor’s
Notebook on the Landing (COMP 348 Group) for specific discussion of resources,
programming environments, and deliverables.
All assignment submissions must include Java source code for a complete
working program that fulfills the requirements for the two programs described
below, plus any additional files as described in the requirements below.
Your primary Java source code file should also include full documentation and
test plan as described in Unit 0 of the Study Guide and expanded upon in the
Instructor’s Notebook.
Failure to submit all required deliverables, including all documentation and
test plans, will result in significant loss of marks.
At the beginning of the submitted work, you must provide the following
statement:
I declare that this assignment is my own work and that all material previously
written or published in any source by any other person has been duly
acknowledged in the assignment. I have not submitted this work, or a
significant part thereof, previously as part of any academic program. In
submitting this assignment I give permission to copy it for assessment
purposes only.
Program Specifications
1. Starting with the example PooledWeblog program in Harold Chapter 4, create
a version of this program that reads a weblog and tallies statistics on the log
entries based on an input option choice.
The program would be executed using the command line ‘java
MyPooledWeblog logname option’ where option is one of the following:
1 = count number of accesses by each remotehost; 2 = count total bytes
transmitted; 3 = count total bytes by remotehost.
Computer Science 348: Network Programming in Java
Page 1 of 2
An example weblog, which your program must process as its input, is
provided on the Landing. You may create additional sample weblogs to
further test your program. All weblogs that you produce should be included
with your assignment submission.
2. Starting with the example SourceViewer program in Harold Chapter 7, create
a version of this source viewer that incorporates a search function. That is,
you provide the program with a server URL or IP and a search string. The
program examines the server for instances of the string and prints only those
lines that contain the string.
If you have used the Unix program GREP, consider this to be a web server
variation of that program. (If you have not used GREP, do a web search on
the program to see how it operates).
The program should execute using the command line 'java SourceViewer
URL/IP “search string”' where URL/IP is a valid URL or IP address (you should
test this in your program) and “search string” is the search string in double
quotes.
Computer Science 348: Network Programming in Java
Page 2 of 2
Download