CS 105 Final Examination Solutions Set -- Fall 1997
False
True
True
True
False
False
True
False
UJEWGY
- ethernet destination address
- ethernet source address
- packet length
- IP destination address
- IP source address
- TCP port number
- Error detecting code
For each example, please briefly explain the problems with the HTML shown and indicate how to modify the HTML to make it correct while producing what the author appeared to have in mind. You can either clearly mark up the code shown or write a complete revision in the space provided.
For the examples using "form" tags, you should assume that the fragment was extracted from a valid pair of opening and closing FORM tags.
<H3 ALIGN=CENTER><FONT SIZE=+3><CENTER>1997-98</CENTER><BR><CENTER>SOME INTERESTING HEADER </FONT></CENTER></H3>
(The big problem here is that the block-level CENTER tag is illegal within any header tag (H3,etc.). One could also argue that the FONT tag should be deleted and the H3 turned into an H2 or H1.)
<HR size=5><TABLE align=left> <TD><IMG SRC="guesswhat.jpeg" ALIGN=LEFT WIDTH="288" HEIGHT="214"></TD> </TABLE><P> i don't remember much...
(The ALIGN=LEFT attribute of the table tag is supposed to make the table float to the margin with text wrapping around it. This is the only thing the TABLE seems to do and putting the ALIGN attribute within the IMG tag would have the same effect.)
(At the least, you have to move the UL tags into the table cell to make this correct. The table doesn't have any function, however, so I would remove it too.)<UL><table> <tr> <td></td> <td><li><A HREF="someplace.html">HOME AWAY FROM HOME</A></li> <li><A HREF="someplaceelse.html">MY NEIGHBORHOOD</A></li> <li><A HREF="elsewhere.html">PARIS</A></li></td> <td></td> </table></UL>
<p> Choose one of the following: <p align=center> <input type="radio"name=value="hereBefore"value=name="RadioButton"> Done This</p> <p align="CENTER"> <input type="radio"name=value="neverHere"value=name="RadioButton"> Never Tried</p>
(All members of a group of radio buttons should have the same name and different values.)
(Check boxes don't use the value attribute.)<p> Indicate as many of the following that describe your experience: <UL> <LI> <input type="checkbox" name="Informative"value="CheckBox"> Informative <LI> <input type="checkbox" name="educational"value="CheckBox"> Educational <LI> <input type="checkbox" name="amusing"value="CheckBox"> Amusing </UL>
Most likely the extra digits function somewhat like parity bits. They are part of an error detecting (and possibly even an error correcting code) that will enable the phone company to detect situation where someone incorrectly enters or records a customer's account number.
void begin() { red= new Slider(2550,0,255,150); add(red); add(new Label("Red")); blue= new Slider(2550,0,255,150); add(blue); add(new Label("Blue")); green= new Slider(2550,0,255,150); add(green); add(new Label("Green")); item= new Choice();item.addItem("Background");item.addItem("Text");item.addItem("Text"); item.addItem("Background"); add(item); pad= new SubCanvas(this,200,100); add(pad); redbg=255; bluebg=255; greenbg=255; redtext=0; bluetext=0; greentext=0;textOrBg="Background";textOrBg="Text"; showDisplay(); }
For each of the following protocol pairs, indicate whether the first protocol is always/sometimes/never used to deliver messages by the second protocol by circling the appropriate choice. If cases where protocol A depends on protocol B and then in turn protocol B depends on protocol C, you should state that protocol A also depends on protocol C.
modulated wave ![]()
carrier wave digital signal
analog signal ![]()
modulated wave carrier wave
Rather than encoding messages in such a way that they can be corrected if they arrive in damaged condition, network protocols rely on encoding techniques that make it possible to recognize but not correct damaged packets together with mechanism for retransmitting such messages. There are two main reasons for this:
- retransmission mechanisms would be required anyway to deal with cases in which packets were not just damaged but actually completely lost.
- error correcting codes require the transmission of more bits that error detecting codes. Since errors occur relatively rarely it is more efficient to use the smaller error detecting encodings.
Suppose defective ethernet hardware was installed on all the computers on an ethernet so that none of them did the "CS" part. Would this:
BRIEFLY, justify your answer.
It would reduce the average rate at which messages could be delivered, but not make it totally impossible. The reduction in rate would be a direct result of the fact that collisions will last longer and therefore waste more potential transmission time. If the network load is low enough, however, each machine will eventually find a time when no other machine is trying to use the network. Therefore, communication is not impossible.
Suppose that to increase reliability, extra parity bits are added to data ultimately being transmitted using on-off keying.
Every sequence of 8 bits would have to contain at least 1 and at least one 0. So, the best you could do is get the ones (or zeroes) in two consecutive 8 bit segments as far from one another as possible as in:1000000 0 0000000 1
A string of 8 1's will be completed by adding 1 as a parity bit. You can many of these together to make a string of 1's of any length you like.