Question 8
OCR Computer Science June 2019 Paper 1AS10 marks
On the specification
- (a)
- 1.3 Exchanging data
- (b)
- 1.3 Exchanging data
- (c)
- 1.3 Exchanging data2.2 Problem solving and programming
- (d)
- 1.3 Exchanging data
Question text
8 A theatre has a website showing its productions and allowing people to make bookings. Part of the site is shown below. The words ‘Book tickets’ link to the page ‘bookings.html’. Upcoming productions: 1. Macbeth 2. Blood Brothers 3. An Inspector Calls Book tickets (a) Write the HTML code for the extract above. [3] The theatre website also uses CSS. (b) Give an example of why the theatre website might use CSS. [1] The theatre offers price reductions on Tuesdays and Wednesdays. The theatre manager wants some text on the website to display “Midweek Special – tickets £15 tonight” on Tuesdays and Wednesdays, and “Tickets £20 tonight” on all other nights. The website coders will use a div tag with the id ‘prices’ to do this. The Javascript code to change the contents of the div tag has been started below. The variable dayCode holds a number representing the current day of the week (0 for Sunday, 1 for Monday, 2 for Tuesday and so on). (c) Complete the Javascript code below so the correct message is displayed in a div tag with the id ‘prices’. var date = new Date(); var dayCode = date.getDay(); //0 is Sunday, 1 Monday, 2 Tuesday etc var priceText=""; = priceText; [4] When a booking is made on the website it is stored in a database. (d) Describe one of the tables you might expect to see in this database. [2]