(a)Discuss the two major concerns with using Java for network applications.[4
marks ]
Security (1):Java interpreter in a browser
should restrict access to clients environment, by preventing access
to disk,memory files,directory and local programs (1).Since Java bytecode
is interpreted by the browser (1),it runs more slowly than C or C++which
are compiled (1).
(b)What is the advantage of caching Web pages at the browser?Is it
a good idea to cache web pages from a site such as CNN or the Stock
Exchange? Explain.[4 marks ]
If pages are cached when they are fetched,then
a subsequent request to display the page (or elements from it,such
as images)(1),can be served more quickly,and without any network access;minimising
the number of TCP connections set up and terminated (1).
No (1).Caching works well unless a page is frequently updated,where
as CNN or Stock exchange web pages are frequently updated (1).
(c)In the HTML tag <IMG SRC="Lincoln.gif" ALT="Abe
Lincoln"> ,theALT
parameter is set in the <IMG> tag.Under what conditions does
the browser use it,and how?[2 marks ]
Browser uses this,when the user has disabled
the image loading o tion (or if the
browser cannot display images)(1).Browser displays the text "Abe
Lincoln"instead of the image (1).
Also give credit for mentioning that the ALT text may be displayed
by some browsers when the mouse is placed over the image.
(d)H w do you make an image clickable in HTML?Give an example.[2
marks ]
<A HREF="http://www.informatics.edu.sg">
<IMG SRC="photo.gif"></A>
(1 mark each for LinkRef with any URL and for including any inline
image with correct syntax)
(e)Imagine that someone in the CS department at Stanford has just
written a new program named newprogram.c and he wants to distribute
it by FTP.He puts the program in the directory /pub/freebies What
is the URL for this program likely to be?[3 marks ]
ftp://www.cs.stanford.edu/pub/freebies/newprogram.c
1 mark each for correct scheme, host/domain name (any sensible suggestion)
and complete correct answer up to maximum 3 marks.
|