$24
/ Instructions
All answers to homework problems must be typed and submitted in a PDF file (if you need help converting to PDF - please ask. I’m happy to help!).
Make sure to include a README.txt file for your code that tells me what OS you built / tested your code in and how to compile your code (remember: the easier for me to build it – the happier I am – the better grade you get).
Code should be easy to read… please comment any complex blocks of code and / or tell me what each of the methods do (remember: if I understand your code easily – the happier I am – the better grade you get).
Remember to cite URL sources you use in comments inside your code.
Please compress your PDF file with your code and README.txt file into a zip file or tar.gz.
/ Homework Questions
Chapter 1 Review Questions (pg. 67): R3 (give real world examples), R11 (look at the slides), R16, R20, R22, R23, R24, R25
Problems (pg. 70):
P1
scanned hand sketches are fine, so is just typing it into word – doesn’t have to be fancy
P18
analyze “Microsoft.com” for the North American server and “Europa.eu” for a European server
use tracert (Windows command line) or traceroute (Linux / Mac bash)
copy / paste the 3 trace-routes
* - means a timeout… this is ok, try it over again, just analyze as best you can by ignoring them
only do parts: b,c,d
/ Programming Assignment
Download the template Java program in Canvas: Files/SocketGet-template.java
Complete the Java command line application. The application accepts a URL (such as “http://www.williammortl.com/index.html) from the command line. For example:
java SocketGet http://www.williammortl.com/index.html
This application should then make a HTTP request to “GET” the HTML page for that URL, then print the HTTP header as well as the HTML for the page to the console.
You must use the Java “socket” class to do all network I/O with the webserver.
Yes, I’m aware this is on Stack Overflow, but you must understand how this works, as you will be tested on it.
For extra credit, try to get things working with HTTPS (this will earn you a 110/100).
I will test your code with the following URLs:
http://www.williammortl.com/index.html
http://www.bellevuecollege.edu/
http://www.nintendo.com/switch/