ExamBank Scot · AH Computing Science question bank · All AH Computing Science questions
15 marks · Maintenance
Name the type of maintenance required. The project manager creates a Gantt chart to plan the development work that will be needed. The design section of the Gantt chart is shown below. Design Tasks User interface design Design of server‑side processes Develop low‑fidelity prototype The project manager claims that use of this Gantt chart for planning will help to: • improve efficiency and ensure work is completed on time • manage resources. By making reference to the section of the Gantt chart shown, explain why you agree or disagree with these claims. A prototype of an updated web page is shown below. This page should allow the user to select the type of computer they wish to buy. Select computer type Desktop Desktop Laptop Tablet Submit selection COMPUTER SALES SCOTLAND WIDE! Screen 1 User selects ‘Desktop’, ‘Laptop’ or ‘Tablet’ Making appropriate use of the name and value attributes, write the HTML statements that would be used to implement the ‘Select computer type’ drop‑down list shown in the prototype above. When computer type ‘Desktop’ is selected at Screen 1, Screen 2 shows the web page that is rendered. Select computer make Cell Cell Race Sung COMPUTER SALES SCOTLAND WIDE! Computer type selected: Desktop Submit selection Screen 2 User selects ‘Make’ When the make ‘Race’ is selected at Screen 2, Screen 3 shows the web page that is rendered. Select computer model CL2 CL2 R456 COMPUTER SALES SCOTLAND WIDE! Computer type selected: Desktop Computer make selected: Race Submit selection Screen 3 User selects ‘Model’ Write the lines of PHP and HTML code required to create the following part of the output on Screen 3. This code should make use of the input selected by the user at Screens 1 and 2. Computer type selected: Desktop Computer make selected: Race The data required to generate the new drop‑down list required for Screen 3 is extracted from the Product table of a database called ComputerSales. Sample data stored in the Product table is shown below. prodID type make model price 1 Desktop Cell C34 399 2 Desktop Race CL2 299 3 Desktop Race R456 499 4 Laptop Sung S34 359 The query used to extract this data from the database is stored in a PHP variable called $query. Using PHP, write the code needed to successfully connect to the database and extract the values required for the ‘Select computer model’ drop‑down list from the database. Your code should make appropriate use of the following connection details: password = Comp5A135 server = ComputerSales_Host user = visitor Explain how the results returned from the query in (c) part (iii) above would be used to display the data shown in the drop‑down list for Screen 3. Your explanation should refer to relevant HTML and PHP statements and constructs. The changes made to the updated website must be tested. The test plan includes the following test cases: Test Expected Result Actual Result Test Successful? Select the following computer: Type = Desktop Make = Race Model = CL2 Specified computer selected using drop‑down lists for type, make and model Add selected computer to the cart Selected computer appears in cart Choose delivery date of Friday 17 June 2023 and make payment Delivery date selected from calendar and payment made Two testers are chosen to complete these tests: • Jill — a member of the development team • Ben — an existing customer asked to test the updated website. Name the type of testing Jill is undertaking. Give one reason for your choice. Name the type of testing Ben is undertaking. Give one reason for your choice. A company sells computers using a database‑driven website. Maintenance is needed to ensure that the website is compatible with the latest 2023 versions of web technologies, including the server‑side database used to store product and order details and the programming languages used in the development of the website.
Adaptive For example: Efficiency: The Gantt chart provided gives no indication of the duration of any of the tasks. This would make it difficult for the project manager to monitor progress and ensure that the work was carried out on schedule. Efficiency: The Gantt chart indicates that two of the tasks can be carried out at the same time. This is helpful when assigning personnel to the tasks to ensure that staff are available when they are needed and once finished, are then free to work on other developments. Resources: The section of Gantt chart provided indicates 3 different tasks requiring different skills. This would be helpful for the project manager when assigning people to the individual tasks to ensure that the correct skills sets are available. Resources: There will be no impact of the management of resources since there is no indication of any specific hardware or software that will be needed to complete the design tasks listed. Award 1 mark each for a discussion of efficiency and management of resources. Discussion must make reference to the section of Gantt chart provided. <select name="ComputerType"> <option value ="desktop">Desktop</option> <option value ="laptop">Laptop</option> <option value ="tablet">Tablet</option> </select> Award 1 mark for correct use of select with name attribute (variable name used is irrelevant) Award 1 mark for correct use of value attributes <?php session_start(); $make = $_post['ComputerMake']; ?> <p> Computer type selected: <?php echo $_session["compType"]; ?> </p> <p> Computer make selected: <?php echo $make; ?> </p> Award 1 mark for correct use of session_start() Award 1 mark for assignment and display of input value for make to PHP variable using name attribute (NB do not penalise for use of $_get). Note that both the $_post and echo statements must be stated in the solution. Also, accept • echo $_post['ComputerMake']; as alternative to echo $make; • $make assigned to a session variable which is later used to display the make Award 1 mark for displaying content of PHP session variable $_session[‘compType’] Note: do not penalise for use of alternatives to p tag Accept any suitable session variable name for computer type and also for posted variable used for computer make. $server="ComputerSales_Host "; $username="visitor"; $password="Comp5A135"; $database="ComputerSales"; $conn = mysqli_connect($server, $username, $password, $database); $result = mysqli_query($conn,$query); Award 1 mark for correct assignment use of details provided in question (password, server, database and user). This may be indicated as separate assignment statements (as in the sample solution) or as parameter values of the mysqli_connect() function. Award 1 mark for correct use of mysqli_connect()function in connection code (with correct 4 parameters. Award 1 mark for correct use of mysqli_query() function (using the PHP variable $query) HTML: The data would be displayed using the HTML SELECT element. The individual models within the statement would be the values of the HTML option element. PHP: A while loop would be used with the PHP mysqli_fetch_array() function to process each individual row of the array containing the query results and the PHP echo statement would be used to display the individual models. Award 1 mark for explanation of how relevant HTML elements would be used. Award 1 mark for explanation how relevant PHP constructs and functions would be used. Final testing As a member of the development team, Jill must check that all aspects of the updated system is working correctly before it is released for end-user testing. Award 1 mark for correct type of testing together with suitable supporting statement End-user testing As an existing customer, Ben is an end-user of the updated system and tests the system to check its usability. Award 1 mark for correct type of testing together with suitable supporting statement