Question 3

OCR Computer Science November 2021 Computer systems (H446-01)A level23 marks

On the specification

(a)
1.3 Exchanging data
(b)
1.3 Exchanging data
(c)
2.2 Problem solving and programming
(d)(i)
1.3 Exchanging data
(d)(ii)
1.3 Exchanging data
(e)(i)
1.3 Exchanging data
(e)(ii)
1.3 Exchanging data
(e)(iii)
1.3 Exchanging data
Question text

3 A website sells tickets for sporting events. The website uses HTML, CSS and JavaScript. (a) Describe the purpose of HTML and CSS within the code of the website. HTML CSS [4] (b) One page in the website contains a hyperlink on an image. When the image stored as “ticket.png” is clicked, the user is hyperlinked to the page stored as “booking.htm”. Write the HTML code to implement this hyperlink. [3] The website charges a booking fee of £2.99 on each ticket sold. In addition, if the tickets are purchased from outside of the UK, £4.99 is added to the booking fee. The booking fee is calculated using a JavaScript function named bookingfee(). (c) Complete the definition of the bookingfee() function below. function bookingfee(numtickets, country) { var nonUKprice = 4.99; var perTicketPrice = ; var total = 0; if (country!="UK") { total = total + ; } total = total + ( * perTicketPrice); total; } [4] (d) The JavaScript function above is used to show users the booking fee. When users click to buy the tickets, the booking fee is calculated again on the server. (i) Explain why server side processing is used to recalculate the booking fee. [3] (ii) Explain one advantage of client side processing to either the customer buying the tickets, or to company who own the website. [2] (e) Users are able to search for and find the ticket website using a search engine. Search engines can use indexing and ranking. (i) Describe how a website is indexed by a search engine. [4] A search engine can use the PageRank algorithm to determine a website’s ranking. The PageRank algorithm utilises a damping factor. (ii) State what is meant by the term ‘damping factor’. [1] (iii) Give two other factors that affect the output value given by the PageRank algorithm for a website. 1 2 [2]