CS 725/825 Computer Networks, IT 725 Network Technology

Assignment 1


Due: Wednesday, September 19, 2018, 2:10 pm (start of the class)

Problems:

  1. (10 points) Chapter 1, Homework Problems and Questions R18 and R25.
  2. (10 points) Chapter 1, Problem P18.
  3. (20 points) Chapter 1, Problems P25, P26, P27, and P28.
  4. (20 points) Chapter 1, Problem P33.

Programming assignment:

  1. (40 points) The purpose of this part of the assignment is to practice finding a simple solution to a trivial programming problem on your own. The secondary objective is to practice writing a clear and concise description of your solution.
  2. Task

    Write a simple program that takes a URL of a webpage as an input (entering it as a command line parameter is fine), reads the page content, measures the time it took to load, and prints first few lines of the returned page together with the time it took. In this assignment, it is not necessary to handle errors (e.g., wrong URL). The solution should be as simple as possible. Your program does not have to print real/user/system time as shown in the sample run, only real time is required:

    [rbartos@agate ~]$ ./a1 http://www.cs.unh.edu/
    <!DOCTYPE html>
    <html lang="en" dir="ltr">
    <head>
      <!--  Disable IE Compatibility Mode -->
      <meta http-equiv="X-UA-Compatible" content="IE=EDGE" />
    
    real  0m0.028s
    user  0m0.005s
    sys   0m0.004s
    [rbartos@agate ~]$

    Your can use any programming language, platform, or development environment.

    Deliverable

    Write a brief report (two pages maximum, included in your single-file submission) that outlines the approach you took. There are two parts to the report. In the first one you will describe how the program that performs the page load and the timing. The second part of the report must show a representative run of your program together with appropriate explanations. Important: by showing an execution of your program, you are making a statement that your program, as submitted, works as shown. An attempt to "fake" a run, for example by writing a program that ignores input and just prints answers regardless of input, will be considered as cheating. Finally, remember, you may be asked to give a demo of your program. If your program does not implement fully the required functionality or does not work, you have to make it clear in the report.

    The source code for the programming part of the assignment must be committed to the course Git repostory.

Submission instructions:

Upload your submission as a single PDF file using MyCourses (mycourses.unh.edu). More details can be found in the standard assignment submission instructions.