ExamBank Scot · AH Computing Science question bank · All AH Computing Science questions
5 marks · CSS media queries
Describe how the CSS for the tablet layout could be adapted to produce the A4 paper layout. Explain the need for integrative testing when developing a database-driven website. Describe how end-user testing would be carried out on a database-driven website. A beautician allows clients to make bookings for treatments using a database-driven website. The website will be displayed on tablet devices and also output to A4 paper so that the beautician has a printed copy of the bookings to refer to as clients arrive. The CSS code used to create the tablet layout is shown below. @media screen (max-width: 700px) { body {background-color: lightgrey} .flower1img {width: 150px; height: 150px} .flower2img {width: 150px; height: 150px} .heading {font-family: Lucida Handwriting; font-size:28px; text-align: center} } tablet layout A4 paper layout
Media print • use @media print instead of media screen Additional changes • change the background colour from lightgrey to white (or none) • remove the second image • reduce the size of the font and/or alignment used to display the heading Award 1 mark for use of media print. Award 1 mark for any two additional changes to produce the paper output. A minimum of two must be indicated. Accept correct code as alternative to description. See sample solution below. @media print { body {background-color: white} .flower1img {display: none} .flower3img {width: 150px; height: 150px} .flower2img {display: none} .heading {font-family: Lucida Handwriting; font-size:12px; text-align: right} } • integrative testing is needed for projects that require integration of separate components • in this situation, integrative testing is needed to verify data is passed correctly between the website and database Award 1 mark for description of integrative testing. Award 1 mark for data connection between website and database. End-user testing would be conducted at the end of the development, with the end users of the software using a live version of the solution and providing feedback to the developers. Award 1 mark for description that indicates role of end-users.