ExamBank Scot · Higher Computing Science question bank · All Higher Computing Science questions

Higher Computing Science 2015 Question 14 (CfE)

11 marks · Data types and structures

State the most appropriate data type used to store the value of the “receive information” check box. Rowena accidentally entered an invalid mobile phone number and an error message is displayed. A valid mobile phone number will consist of a string of 11 digits. Using pseudocode or a programming language of your choice, write the algorithm which would check that the mobile phone number is valid. An algorithm is implemented to validate the applicant’s data from the application form opposite. There are two subprograms at lines two and three. The parameters for these subprograms are not shown. Line 1 REPEAT Line 2 Enter_applicant_data (…) Line 3 Validate_form_data (…) Line 4 UNTIL <form data is valid> Name a parameter that should be passed at line 2, state the type of parameter passing used and justify your answer. EcoCaledonia has its own servers which need to be upgraded and is considering migrating to a hybrid cloud. Describe what is meant by a hybrid cloud. State two advantages for EcoCaledonia of switching to a hybrid cloud. EcoCaledonia recruits employees using an online application form. Rowena completes her form and receives the feedback below: Miss Rowena Drayton Male Female Please enter a valid mobile phone number Are you happy to receive information from our partner companies Please correct the following information * Indicates required fields Title: * First name: * Surname: * Gender: * Email address: * rowenadrayton@schoolmail.co.uk Mobile phone number: 077g6367324

Marking scheme

boolean This is one approach to solving this problem. Reference Language Line 1. SET valid TO True Line 2. IF Length (mobile_number) <> 11 THEN Line 3. SET valid TO False Line 4. ELSE Line 5. FOR counter FROM 1 TO 11 DO Line 6. IF (Mid(mobile_number, counter, 1) < “0”) OR (Mid(mobile_number, counter, 1) > “9”) THEN Line 7. SET valid TO False Line 8. END IF Line 9. END FOR Line 10.END IF Candidates will employ a wide range of approaches to tackling this question. Question is intended to test logical approach to the scenario. • 1 Mark for checking the length of the string • 1 Mark for using a loop to traverse over each character • 1 Mark for use of a correct complex if or loop condition (may include check on first character being zero) An additional mark may be awarded for any of the following bullets for a maximum of two marks. • 1 Mark for use of conditional loop that includes a request for re-entry of mobile number • 1 Mark for valid use of a Boolean • 1 Mark for an error message if an invalid number has been entered • Name of a valid parameter AND passed by reference/byRef (1 mark) • As the value will be updated AND returned/passed out (1 mark) Parameters from the form: title, first name, surname, gender, email address, mobile phone number. ‘Passed out’ alone is not worth a mark. A hybrid cloud is a combination of a private and public cloud. • Store sensitive data on the private cloud (1 mark) • Can outsource services to public cloud (at times of need) (1 mark) • Can easily expand capacity of public cloud storage without hardware costs (1 mark) • Public cloud use will not results in the purchase of new hardware/servers • Public cloud use reduces cost in relation to backup strategies. (1 mark) Any two bullets for a maximum of two marks. Generic security based answers need contextualised in line with use of private cloud. Must specify where cost savings are being made.

Previous question: Higher Computing Science 2015 Question 13 (CfE)

Next question: Higher Computing Science 2015 Question 15 (CfE)