ExamBank Scot · AH Computing Science question bank · All AH Computing Science questions
15 marks · Feasibility studies and user surveys
Part of the booking process requires a new customer to register before making an appointment. When registering, customers must provide their full name and contact telephone number. Name the type of feasibility study that is highlighted in the requirements for this part of the booking system. Justify your answer. Part of the use case diagram is shown. browse site register user make appointment modify registered appointment user Describe the relationship between the actors in the diagram. Customers who want to modify an existing appointment must enter the appointmentID in a HTML form. The code for this HTML form is shown below. Line 1 <form action = "modifyAppt.php" method = "GET"> Line 2 Appointment ID: <input type="text" name="apptID" /> Line 3 <input type="submit" value="Modify Appointment"> Line 4 </form > Write the PHP code for the file modifyAppt.php to assign the form data to suitable server‑side variables. The website connects to an external database server using the following credentials. ➢ Username: Harvey ➢ Password: £dxG67* ➢ Server: db.hbh.com ➢ Database: hairbyharvey Write the PHP code used to establish a connection with the database server using a variable called $conn. The database table called Stylist is used to store details of all stylists who work in the salon. Sample data from the Stylist table is shown below. Stylist stylistID sFirstName sLastName ratePerHour 1 Harry McCann 14.25 2 Tina Reid 15.00 3 Jeremy Gerrard 14.50 … … … … A query is used to display the full name of all stylists who earn at least £14.50 per hour. The incomplete PHP code used to execute this query and display the results is shown below. Line 1 $sql = "SELECT sFirstName, sLastName FROM Stylist WHERE ratePerHour >= 14.50"; Line 2 // execute query and store results in $result Line 3 $result = ________________________ ; Line 4 // check query has returned at least one row of data Line 5 if ( ________________________ > 0 { Line 6 … // process each row of data Write the PHP code needed to complete Line 3 and Line 5. The website will be used to output data to tablets and A4 paper. The planned layout for both forms of output media is shown below. planned layout of tablet output planned layout of A4 paper output 800 px 1024 px The CSS used to create the tablet layout is shown below. @media screen and (max-width:800px) { body { background-color: light-grey } .mirrorImg { width: 200px; height: 200px } .combImg { width: 200px; height: 200px } .heading { font-family: Arabic; font-size: 32px } } Describe how the CSS could be adapted to produce the layout for paper output. Once developed, all aspects of the website will be tested. The test plan for the completed website includes the persona and test case described below. Persona Test Case Lesley is a 27‑year‑old who likes to make regular bookings to have her hair coloured every 12 weeks. Log on to the system using customer ID 4. Make a booking for a hair colouring treatment on 22nd July 2022 and a follow‑up booking 12 weeks later. Some screen shots resulting from this section of testing are shown below. introductory screen APPOINTMENT BOOKING LOG IN REGISTER Log in using your customer ID Users must register before or your contact number. booking any treatment. Adding payment details is optional. appointment date APPOINTMENT BOOKING 22 Jul 2022 Leave blank if no preference Treatment required BOOK CLEAR CANCEL treatment APPOINTMENT BOOKING 22 Jul 2022 Leave blank if no preference Treatment required Trim Hair Colouring BOOK Cut CLEAR CANCEL Welcome Lesley Welcome Lesley Date of Appointment Date of Appointment Stylist Available Stylist Available Name and describe the type of testing illustrated above. Explain whether the solution shown is fit for purpose. Hair by Harvey is a hair salon. A team of developers is creating a database‑driven website to allow customers to book appointments for treatments at the salon.
Legal feasibility The description makes refers to personal data that would be stored by the system and this has an implication for GDPR. 1 mark for correct type of feasibility with reason Note: mark should not be awarded if no justification is provided This shows that the Registered User actor is a form of the User actor and will inherit all of its characteristics. 1 mark for the correct description $apptID = $_GET["apptID"]; 1 mark for use of $_GET 1 mark for assignment to PHP variable using correct form element names Note: accept alternative PHP variable name $servername = "db.hbh.com" $username = "Harvey" $password = "£dxG67*" $dbase = "hairbyharvey" $conn = mysqli_connect($servername, $username, $password, $dbase) Acceptable alternative: $conn = mysqli_connect ("db.hbh.com", "Harvey", "£dxG67*", "hairbyharvey") 1 mark for correct use of mysqli_connect() to assign connection to $conn variable 1 mark for parameters in correct order (server, user, password, database) Note: accept alternative PHP variable names Also: accept alternative solution that doesn’t assign connection credentials to PHP variables Line 3 mysqli_query($conn, $sql); Line 5 mysqli_num_rows($result); 1 mark for mysqli_query() 1 mark for ($conn, $sql) arguments with mysqli_query() 1 mark for mysqli_num_rows() 1 mark for $result argument with mysqli_num_rows() Use @media print instead of @media screen. Change the background colour from light grey to white, remove the second image and reduce the size of the font used to display the heading. Sample Code: @media print { body { background-color: white } .mirrorImg { width: 200px; height: 200px } .combImg { display: none } .heading { font-family: Arabic; font-size: 12px } } 1 mark for use of @media print rather than @media screen 1 mark for additional changes needed to produce the paper output. A minimum of two of the following must be included: - changing background colour to white or none - removing the second image - changing the font size in the heading Accept marks for correct code as alternative to a description During final testing, all tasks required to satisfy the test case are carried out by one of the development team who adopts the persona described. 1 mark for final testing 1 mark for description The solution shown is not fit for purpose because there is no option to make a follow-up booking so each booking needs to be made individually. The solution shown is fit for purpose since it is possible to book a follow- up appointment by making an entirely new appointment. 1 mark for indicating that solution is not fit for purpose together with a supporting reason that refers to the evidence provided OR 1 mark for indicating that solution is fit for purpose together with a supporting reason