2010/11 Exam – Model Solutions.
1. (a) (i) The port number is 80 (1 mark), the hostname is studentnet (1 mark) and the fully qualified domain name is studentnet.kingston.ac.uk (1 mark).
(ii) The port number (1 mark) and the protocol (1 mark).
(iii) When the server is running Java servlets (1 mark) in which case the port is 8080 (1 mark).
(b) (i) HTML is a stand-alone language for web (1 mark). XML is a meta-markup language (1 mark) for defining custom data-structures (1 mark) or defining other markup languages (1 mark). XHTML is an improved version of HTML defined through XML (1 mark).
(ii) An XML namespace is a nomenclature domain (1 mark) within which specific tag and attribute names have specific interpretations (1 mark). URL’s are useful for namespaces since they are unique (1 mark).
(iii) A document type definition (DTD) is written in a different language from XML, whereas a schema is itself an XML document (1 mark) and the programmer need only be familiar with one kind of syntax (1 mark). Furthermore, DTS’s allow only predefined data types (1 mark) whereas schemas allow new data-types to be defined (1 mark).
(c)
Morgan Plus 4 1950 Excellent £100,000 Mr. A. Student
MG MGB 1962 Good £800,000 Mr. A. Student
(6 marks)
2. (a) (i) Java is class-based and generates all objects from classes (1 mark). JavaScript allows objects but not classes (1 mark).
(ii) An event handler is a piece of code executed in response to a user event (1 mark).
Example: (3 marks).
(b) (i) Script directly embedded in the body is executed once when the browser encounters it (1 mark) or multiple times in response to events in the case of event handlers (1 mark). Header scripts are generally functions which may be called by event handlers (1 mark).
(ii)