Question 12
AQA Computer Science June 2018 Paper 1AS8 marks
On the specification
- 12.1
- 3.1 Fundamentals of programming
- 12.2
- 3.3 Systematic approach to problem solving
Question text
12 This question will extend the functionality of the program. To send a Morse code message, the dots and dashes need to be converted into signals. What you need to do: Task 1 Create a new subroutine SendSignals that converts a Morse code message such as -⌂.⌂.-⌂⌂⌂-..- (TEA X) to its equivalent signal ===⌂⌂⌂=⌂⌂⌂=⌂===⌂⌂⌂⌂⌂⌂⌂===⌂=⌂=⌂===⌂ by using the rules • a dot is converted to an equals sign (=) followed by a space • a dash is converted to three equals signs (===) followed by a space • a space is converted to two spaces. (This results in three spaces after the signals for a letter.) Note that ⌂ represents a space and should be displayed as a space on screen. The subroutine is to output the complete transmission string to the screen. Add the call SendSignals(MorseCodeString) as the last statement to be executed in the subroutine SendMorseCode. Task 2 Test that the changes you have made work by conducting the following test: • run the program • choose option S • enter the string MORSE X Evidence that you need to provide Include the following evidence in your Electronic Answer Document. 12.1 Your PROGRAM SOURCE CODE for the subroutine SendSignals. [7 marks] 12.2 SCREEN CAPTURE(S) showing the Morse code message and the signals. [1 mark]