QCAA Digital Solutions Prototype digital data exchanges

15 sample questions with marking guides and sample answers · Avg. score: 55%

Q3
2025
QCAA
1 mark
Q3
1 mark

When blocks of code reduce the complexity of a system, this is known as

A

iteration.

B

selection.

C

sequencing.

D

modularisation.

Reveal Answer
A

iteration.

Incorrect. Iteration refers to the repetition of a block of code, such as a loop, rather than organizing code to reduce system complexity.

B

selection.

Incorrect. Selection involves using conditions (like if/else statements) to determine which path a program takes, not breaking a system into simpler blocks.

C

sequencing.

Incorrect. Sequencing is the fundamental process of executing code instructions in a specific, top-to-bottom order.

D

modularisation.

Correct Answer

Correct. Modularisation is the practice of dividing a program into separate, independent blocks (modules or functions), which abstracts details and significantly reduces overall system complexity.

Q14
2022
QCAA
6 marks
Q14
6 marks

Refer to Stimulus 3 in the stimulus book.

A secondary school stores encrypted student results in a database. To access their results, students must log in using their student ID and password. Login details are checked against the database to ensure only authorised students can gain access.

Passwords are encrypted for added security. Once logged in, students must enter a public decryption key to have their results displayed.

The database contains overall results for all subjects and students. Only results linked to the relevant student ID are displayed; students cannot view other students' results.

The algorithm for this system is incomplete. Complete the algorithm using the supplied code library.

BEGIN
    GET studentID from input form
    GET password from input form
    GET key from input form
Reveal Answer

BEGIN
    IF checkLogin(studentID, hashPassword(password)) THEN
        Results = getResults(studentID)
        FOR i = 0 to (size of Results)-1
            Display decryptData(key, results[i])
        ENDFOR
    ELSE
        Display “Access denied”
    ENDIF
END
Marking Criteria
DescriptorMarks

Symbolises, without logic errors, an algorithmic statement for password encryption using 'hashPassword'

1

Symbolises, without logic errors, an algorithmic statement for checking student ID and hashed password using 'checkLogin'

1

Symbolises, without logic errors, an algorithmic statement for handling login errors

1

Symbolises, without logic errors, an algorithmic statement for retrieving data for specific student ID using 'getResults'

1

Symbolises, without logic errors, an algorithmic statement for outputting data for specific student ID using 'decryptData'

1

Effectively uses pseudocode conventions

1
Q3
2024
QCAA
1 mark
Q3
1 mark

How could a developer refine the following algorithm to improve maintainability?

/* Calculate the average value of an input array */
0 START
1     INPUT x AS ARRAY
2     SET sum = 0
3     FOR n IN x
4         sum = sum + n
5     ENDFOR
6     CALCULATE result = sum / length of x
7     OUTPUT result
8 END
A

Use an error-checking function.

B

Write code comments on every line.

C

Rename variables n, x and result to be more descriptive.

D

Incorporate a function from an available code library to sum the array.

Reveal Answer
A

Use an error-checking function.

Error checking improves the robustness and reliability of the program (e.g., preventing division by zero), but it does not primarily address the readability or ease of modifying the code.

B

Write code comments on every line.

Commenting every line creates visual clutter and redundancy, as the code itself should be clear enough to understand; comments should focus on explaining complex logic or intent rather than obvious syntax.

C

Rename variables n, x and result to be more descriptive.

Correct Answer

Renaming single-letter variables like xx and nn to descriptive names (e.g., numbersnumbers and currentValuecurrentValue) makes the code self-documenting, significantly improving readability and making it easier for developers to understand and maintain.

D

Incorporate a function from an available code library to sum the array.

While using library functions is efficient, the most immediate flaw in the provided algorithm regarding maintainability is the use of ambiguous variable names, which makes the logic harder to follow.

Q13
2022
QCAA
12 marks
Q13

Refer to Stimulus 2 in the stimulus book.

Q13a
7 marks

Use pseudocode to symbolise a one-time pad encryption algorithm with any lower case letters. Users must input the plain text and key.

Reveal Answer
Marking Criteria
DescriptorMarks

Symbolises, without logic errors, an algorithmic statement for user input of text

1

Symbolises, without logic errors, an algorithmic statement for user input of key

1

Symbolises, without logic errors, an algorithmic statement for 'indexOf' sub-procedure

1

Symbolises, without logic errors, an algorithmic statement for 'lengthOf' sub-procedure

1

Symbolises, without logic errors, an algorithmic statement for 'checkLowerCase' sub-procedure

1

Symbolises, without logic errors, an algorithmic statement for 'lowerCaseAlphabet'

1

Effectively uses pseudocode conventions

1
Q13b
5 marks

Evaluate the encryption algorithm developed in Question 13a) by performing a desk check. Use the plain text and key provided. Specify all inputs and outputs in table form.

Plain text: Queens
Key: ryjwah
Example output: hsnanz

Reveal Answer

userText = queens
opyKey = ryjwah

Letter of userText = q u e e n s
userText letter index= 16 20 4 4 13 18

Letter of optKey = r y j w a h
otpKey letter index = 17 24 9 22 0 7

Encryption index = 7 18 13 0 13 25
cipherOutput = h s n a n z
Marking Criteria
DescriptorMarks

Demonstrates accurate use of one programming feature that specifies all inputs and outputs in table form

1

Demonstrates accurate use of a second programming feature that specifies all inputs and outputs in table form

1

Demonstrates accurate use of a third programming feature that specifies all inputs and outputs in table form

1

Demonstrates accurate use of a fourth programming feature that specifies all inputs and outputs in table form

1

Demonstrates accurate use of a fifth programming feature that specifies all inputs and outputs in table form

1
Q7
2023
QCAA
1 mark
Q7
1 mark

The algorithm outputs a data set according to values a user inputs.

1 BEGIN
2     INPUT firstNum
3     INPUT secondNum
4     FOR i = 1 TO firstNum
5         FOR j = 1 TO secondNum
6             CALCULATE result = i * j
7             OUTPUT i "*" j "=" result
8         ENDFOR
9     ENDFOR
10 END

If the user inputs firstNum = 6 and secondNum = 10, how many times would line 6 be executed?

A

1

B

6

C

10

D

60

Reveal Answer
A

1

This option assumes the code runs only once, ignoring the repetition caused by the FOR loops.

B

6

This is the number of times the outer loop runs (66), but for each of those iterations, the inner loop runs 1010 times.

C

10

This is the number of times the inner loop runs (1010) for a single iteration of the outer loop, but the outer loop repeats this process 66 times.

D

60

Correct Answer

Because the loops are nested, the total number of executions is the product of the outer loop count and the inner loop count: 6×10=606 \times 10 = 60.

Q2
2024
QCAA
1 mark
Q2
1 mark

A retail store uses facial recognition to send text messages about sale items to consenting customers while they are in the store.

This use of data personally impacts customers through

A

invasion of privacy.

B

increased data accuracy.

C

improved store inventory management.

D

a more personalised shopping experience.

Reveal Answer
A

invasion of privacy.

Since the question specifies that the customers are "consenting," they have agreed to the data collection, so it is not considered an invasion of privacy in this context.

B

increased data accuracy.

Data accuracy is a technical characteristic of the system or a benefit for the store's records, rather than a direct personal impact on the customer's experience.

C

improved store inventory management.

Improved inventory management is an operational benefit for the business, not a personal impact on the individual customer.

D

a more personalised shopping experience.

Correct Answer

The technology allows the store to identify specific individuals and direct relevant information to them, thereby tailoring the service to create a personalised experience.

Q13
2023
QCAA
9 marks
Q13
9 marks

A one-time pad algorithm encrypts an 8-character word and outputs the result. The algorithm uses 0 as the first index in an array. There are four errors on lines 9 to 21 inclusive.

1 BEGIN
2     INPUT word
3     word = word converted to lowercase
4     plainText = word converted to an array
5     //The GenerateOTPKey function will return an array of 8 random numbers
6     key = GenerateOTPKey()
7     cipherText = array of 8 blank characters
8     alphabet = lowercase alphabet converted to an array
9     FOR i = 0 to 9
10        alphabetLocation = -1
11         FOR j = 0 to 25
12             IF plainText[j] = alphabet[i]
13                 alphabetLocation = j
14             ENDIF
15         ENDFOR
16         //Check if not found
17         IF alphabetLocation ≥ 0 THEN
18             cipherText[i] = alphabet(alphabetLocation + key[i])mod 26
19         ENDIF
20     ENDFOR
21     OUTPUT cipherText[i]
22 END

Use pseudocode to correct the four errors on lines 9 to 21. Justify your response.

Reveal Answer

Line 9:
FOR i = 0 to 7
Upper boundary of FOR Loop should be 7, otherwise it will look for values that don't exist in the plainText array.

Line 12:
IF plainText[i] = alphabet[j]
Indexes in the IF statement should be switched — the variable i is the index for the plaintext, the variable j is for the alphabet. If this is not corrected, the pseudocode will be looking for letters in the plainText array that don't exist.

Line 18:
cipherText[i] = alphabet[(alphabetLocation + key[i]) mod 26]
Bracket should be added to after the mod (otherwise it will be trying to perform a mod operation on a letter of the alphabet).

Line 21:
OUTPUT cipherText
Index should be removed from output statement as this will cause it to only output one character (or none due to scoping issues).

Marking Criteria
DescriptorMarks

Logically symbolises a solution for the error on line 9

1

Logically symbolises a solution for the error on line 12

1

Logically symbolises a solution for the error on line 18

1

Logically symbolises a solution for the error on line 21

1

Justifies symbolised solution for line 9

1

Justifies symbolised solution for line 12

1

Justifies symbolised solution for line 18

1

Justifies symbolised solution for line 21

1

Does not introduce new logic errors

1
Q6
2021
QCAA
1 mark
Q6
1 mark

Desk check the algorithm to predict the output for numX = 8 and numZ = 5.

BEGIN
    SET numX user input
    SET numZ user input
    IF numX < 10 AND numZ > 10 THEN
        OUTPUT ‘Condition 1’
    ELSE numX > 5 OR numZ < 5 THEN
        OUTPUT ‘Condition 2’
    ELSE numX > 5 OR numZ < 10 THEN
        OUTPUT ‘Condition 3’
    ELSE
        OUTPUT ‘Condition 4’
    ENDIF
END
A

Condition 1

B

Condition 2

C

Condition 3

D

Condition 4

Reveal Answer
A

Condition 1

This condition requires both numX<10numX < 10 and numZ>10numZ > 10. While 8<108 < 10 is true, 5>105 > 10 is false, so the AND operation evaluates to false.

B

Condition 2

Correct Answer

This condition checks if numX>5numX > 5 OR numZ<5numZ < 5. Since numX=8numX = 8, the first part (8>58 > 5) is true, making the entire OR statement true.

C

Condition 3

Although the condition numX>5numX > 5 is true, this branch is part of an IF-ELSE structure. Because the previous condition (Condition 2) was already met, the algorithm stops there and does not evaluate this branch.

D

Condition 4

The final ELSE block only executes if all preceding conditions evaluate to false. Since Condition 2 was true, this block is skipped.

Q6
2022
QCAA
1 mark
Q6
1 mark

Complete the Caesar encryption algorithm with the correct statement at line 5.

0 BEGIN
1     INPUT userText AS STRING
2     INPUT userShift AS INTEGER
3
4     FOR each character IN userText
5
6         result = result + newCharacter
7     ENDFOR
8     OUTPUT result
9 END
A
newCharacter = userText + userShift
B
newCharacter = character + userShift
C
newCharacter = character - userShift
D
newCharacter = character + userShift MOD 26
Reveal Answer
A
newCharacter = userText + userShift

This incorrectly attempts to add the shift value to the entire input string (userText) rather than the individual character currently being processed in the loop.

B
newCharacter = character + userShift

While this adds the shift to the character, it fails to handle the "wrap-around" logic (e.g., shifting 'z' to 'a'). Without the modulo operator, the result could be a non-alphabetic symbol.

C
newCharacter = character - userShift

This subtracts the shift (which is typically used for decryption, not encryption) and also lacks the necessary modulo operator to handle wrapping around the alphabet.

D
newCharacter = character + userShift MOD 26
Correct Answer

This is the correct logic for a Caesar cipher. It adds the shift to the character and uses MOD 26 to ensure the value wraps around the alphabet (cycling from Z back to A) and remains a valid letter.

Q10
2022
QCAA
1 mark
Q10
1 mark

Desk check the algorithm to determine its output.

BEGIN
    SET X = 6
    SET Y = 12
    WHILE (X < Y)
        INCREMENT X
        Y = PROCESS1(X, Y)
    ENDWHILE
    OUTPUT Y
END

BEGIN PROCESS1 (A, B)
    CALCULATE C = (B - A) * 2
    RETURN C
END PROCESS1

The output value is

A

-10

B

4

C

8

D

10

Reveal Answer
A

-10

This incorrect value likely results from reversing the subtraction order in the function to (AB)2(A - B) * 2 during the first iteration, yielding (712)2=10(7 - 12) * 2 = -10.

B

4

Correct Answer

First iteration: XX becomes 7, YY becomes (127)2=10(12-7)*2 = 10. Second iteration: XX becomes 8, YY becomes (108)2=4(10-8)*2 = 4. The loop ends because 848 \not< 4.

C

8

This is the final value of variable XX when the loop terminates, but the algorithm explicitly outputs variable YY.

D

10

This is the value of YY after the first iteration. However, since X=7X=7 is still less than Y=10Y=10, the loop executes a second time.

Q6
2020
QCAA
1 mark
Q6
1 mark

This algorithm determines the total points a player receives from rolling a standard six-sided dice three times.

BEGIN
    SET points = 0
    SET count = 0
    REPEAT
        SET result = random number between 1 and 6 inclusive (roll die)
        SET number on die as result
        IF result = 1 THEN
            points = points + 100
        ELSE
            IF result = 5
                points = points + 50
            ENDIF
        ENDIF
        INCREMENT count
    UNTIL count = 3
END

How many points will a player receive if they roll a 2, then a 3, followed by a 5?

A

50

B

100

C

150

D

200

Reveal Answer
A

50

Correct Answer

The rolls of 2 and 3 do not meet the conditions to add points, but the roll of 5 triggers the condition IF result = 5, adding 50 points for a total of 0+0+50=500 + 0 + 50 = 50.

B

100

This score would result from rolling a 1, which awards 100 points. However, the sequence (2, 3, 5) does not contain a 1.

C

150

This total implies rolling both a 1 (100 points) and a 5 (50 points). The provided sequence only contains a 5, so the 100 points are not awarded.

D

200

This total would require rolling two 1s (100+100100 + 100), which does not match the outcomes in the sequence 2, 3, 5.

Q4
2024
QCAA
1 mark
Q4
1 mark

An algorithm performs an operation.

0 BEGIN
1     SET x = 0
2     FOR i FROM 1 TO 100
3         IF is Prime(i) THEN
4             x = x + i
5         ENDIF
6     ENDFOR
7     OUTPUT x
8 END

What does the algorithm output?

A

whether a given number is prime

B

the sum of the first 100 prime numbers

C

the prime numbers between 1 and 100, including 100

D

the sum of the prime numbers between 1 and 100, including 100

Reveal Answer
A

whether a given number is prime

The algorithm outputs a single numerical value accumulated in variable xx, not a boolean (true/false) result regarding a specific number's primality.

B

the sum of the first 100 prime numbers

The loop iterates through the numbers 11 to 100100, summing the primes found in that range. It does not continue until it finds the first 100 distinct prime numbers.

C

the prime numbers between 1 and 100, including 100

The algorithm outputs the variable xx, which is a sum. It does not output the list of individual prime numbers found.

D

the sum of the prime numbers between 1 and 100, including 100

Correct Answer

The variable xx acts as an accumulator, adding the value of ii to the total only when ii is prime, for every integer ii from 11 to 100100.

Q13
2021
QCAA
5 marks
Q13

In an online silent auction, items are posted on a public website and participants post a secret bid on the items they would like to purchase. Bidders cannot see each other’s bids. The bidding period is 7 consecutive days.
At the end of the auction, all bid values are revealed on the website and the highest bidder pays the amount they posted to obtain the item.

Q13a
3 marks

Explain how checksums, encryption and authentication would improve the security of the data exchange in this scenario.

Reveal Answer

A checksum algorithm would be used to inspect the binary representation of auction data. If the checksum from the user is different from the checksum on the server, it means that the data has been corrupted or manipulated.

Encryption would be used to scramble the auction data to make it impossible to read in transit, but allowing it to be decrypted by the authorised recipient with a secret key.

Authentication would be used to verify the identity of the participant by using a digital signature or authentication code. A digital signature confirms that the bidder is who they say they are.

Marking Criteria
DescriptorMarks

Explains how the security of the data exchange would be improved through checksums

1

Explains how the security of the data exchange would be improved through encryption

1

Explains how the security of the data exchange would be improved through authentication

1
Q13b
2 marks

Recommend one encryption method to securely store auction data and justify your response.

Reveal Answer

I would recommend AES for encrypting auction data to avoid a security breach. AES supersedes DES and 3DES and uses 128-bit blocks with 128, 192 and 256-bit encryption keys, whereas DES and 3DES use 64-bit blocks and key encryption. DES and 3DES are older ciphers and easily cracked in as little as one day, which would provide an opportunity for a hacker to gain access to auction data before the bids are revealed.

Marking Criteria
DescriptorMarks

Recommends a valid encryption method

1

Effectively justifies the recommended encryption method

1
Q12
2022
QCAA
8 marks
Q12

Refer to Stimulus 1 in the stimulus book.

Q12a
6 marks

Describe the listed algorithm constructs and identify one example of each from the stimulus. Use corresponding line numbers to identify examples.

Assignment:

Example:

Condition:

Example:

Iteration:

Example:

Reveal Answer

Assignment: A value (stated or calculated) stored in a variable/memory location.
Example: Line 13, value = 0.04.

Condition: A comparison that retrieves a true or false value (or the value of a Boolean variable).
Example: Line 12, IF depositAmount <= 10000.

Iteration: A group of algorithmic statements that are repeated while a condition is met.
Example: Lines 25–27

FOR i = 0 TO years
deposit = depositAmount + depositAmount x interestRate
NEXT i
Marking Criteria
DescriptorMarks

Describes assignment

1

Describes iteration

1

Describes condition

1

Identifies an example of assignment

1

Identifies an example of condition

1

Identifies an example of iteration

1
Q12b
2 marks

Explain the purpose of modularisation and identify an example of how it is used in the stimulus. Use corresponding line numbers in your response.

Reveal Answer

Modularisation breaks sections of code into smaller chunks so the algorithm is easier to understand, and allows the same code to be used in different parts of the application. For example, calculateInterestRate is a separate module (lines 11–22) and is called/used at line 5. It returns a value (line 21) which is stored in interestRate (line 5).

Marking Criteria
DescriptorMarks

Explains the purpose of modularisation

1

Identifies an example of how modularisation is used

1
Q12
2021
QCAA
18 marks
Q12

A mobile application (app) allows car owners to remotely unlock their cars if they lock the keys inside or their keys malfunction. Once users have created an account, they can request a remote unlock by entering their username and password.

The user data that is required to set up an account includes:

  • full name
  • date of birth
  • home address
  • driver licence number
  • vehicle make, model and colour
  • vehicle registration.
Q12a
6 marks

Analyse the information and evaluate risks to data confidentiality, integrity and availability for this app. Justify your response with three examples.

Reveal Answer

A data confidentiality risk is the possibility that an unauthorised person could observe the user data in transit. For example, the app requires a password for the user to log in and the data would need to be encrypted so that it cannot be stolen.

A data integrity risk is the possibility that the data could become corrupted, lost or be maliciously manipulated. For example, the wrong car might be unlocked or a hacker might use the data to cause distress.

A data availability risk is the possibility that someone may interfere with transmission to prevent data packets from reaching the intended destination, allowing them to access the person's car so that they can steal it.

Marking Criteria
DescriptorMarks

Logically evaluates risks to data: confidentiality

1

Logically evaluates risks to data: integrity

1

Logically evaluates risks to data: availability

1

Justifies this evaluation by providing a coherent example of a risk to data: confidentiality

1

Justifies this evaluation by providing a coherent example of a risk to data: integrity

1

Justifies this evaluation by providing a coherent example of a risk to data: availability

1
Q12b
2 marks

Identify a relevant Australian Privacy Principle and explain an ethical consideration when using app data.

Reveal Answer

Australian Privacy Principle: Security of personal information. Allow an administrator to de-identify or destroy personal information once it is no longer in use.

Ethical consideration: Security of personal information is important if the user sells their car, or if the car is no longer in use. The user should not be getting unnecessary calls or marketing materials for a service they no longer use or for a car they no longer own, and it would be unsafe for the original owner to still have access to the vehicle once it has been sold.

Marking Criteria
DescriptorMarks

Identifies a relevant Australian Privacy Principle (APP)

1

Logically explains an ethical consideration relating to the identified APP

1
Q12c
2 marks

You discover that the app uses a Caesar cipher to encrypt data, allowing you to intercept a password in transit. Perform a desk check for five iterations to decrypt the password ‘KYIWW’.

Reveal Answer

ABC DE FG H I J K L M N O P Q R S T U V W X Y Z

KEY SHIFTPASSWORD
0K Y I W W
1J X H V V
2I W G U U
3H V F T T
4G U E S S
Marking Criteria
DescriptorMarks

Performs a desk check that decrypts the password using iterations

1

Contains no errors

1
Q12d
8 marks

A friend is interested in learning more about encryption. Use pseudocode to symbolise a simple Caesar cipher as a demonstration.

Reveal Answer

BEGIN
INPUT string plainText
INPUT int keyShift
SET string alphabet =ABCDEFGHIJKLMNOPQRSTUVWXYZ
SET encryptedText = ""
    FOR each character in plainText
        SHIFT character by keyShift
        APPEND letter to encryptedText
    END FOR
    RETURN encryptedText
END
Marking Criteria
DescriptorMarks

Symbolises INPUT for password string

1

Symbolises INPUT for key or shift integer

1

Symbolises declarative statement for alphabet

1

Symbolises a FOR loop to traverse password one character at a time

1

Symbolises a function to encrypt password one character at a time, using the key

1

Symbolises RETURN for encrypted password

1

Symbolises an algorithm with no logic errors

1

Effectively uses pseudocode conventions

1

Frequently Asked Questions

How many QCAA Digital Solutions questions cover Prototype digital data exchanges?
AusGrader has 33 QCAA Digital Solutions questions on Prototype digital data exchanges, all with instant AI grading and detailed marking feedback.

Ready to practise QCAA Digital Solutions?

Get instant AI feedback on past exam questions, aligned to the syllabus

Start Practising Free