QCAA Digital Solutions Innovative digital solutions

8 sample questions with marking guides and sample answers · Avg. score: 55.6%

Q8
2020
QCAA
1 mark
Q8
1 mark

A soccer club needs to develop a system for storing members’ data, including:

• name

• address

• team

• membership type

• email address

• phone number.

The secretary wants to email weekly newsletters to members. The treasurer wants to print membership lists and store yearly payment information.

To produce this system, the developer will need to generate a database, design interfaces and develop coded modules to send emails. After adding and updating member details, they will also need to

A

generate reports and process payments.

B

generate reports and provide secure logins for users.

C

process payments and provide secure logins for users.

D

generate reports, process payments and provide secure logins for users.

Reveal Answer
A

generate reports and process payments.

While this covers the treasurer's needs for reports and payments, it fails to include secure logins, which are essential for protecting the sensitive personal and financial data stored in the system.

B

generate reports and provide secure logins for users.

This option misses the requirement to process or store payment information, which is explicitly stated as a need for the treasurer.

C

process payments and provide secure logins for users.

This option overlooks the treasurer's need to print membership lists, which requires the system to generate reports.

D

generate reports, process payments and provide secure logins for users.

Correct Answer

This is the most comprehensive solution: it addresses the treasurer's need for reports (membership lists) and payment handling, while also ensuring the security of private member data through secure logins.

Q8
2021
QCAA
1 mark
Q8
1 mark

An algorithm is developed to establish a seating plan in a movie theatre so that individual bookings are always separated by two seats. To maximise ticket sales, bookings of four or more guests are accepted immediately. Bookings for smaller groups are not confirmed until 2 hours before the movie starts.

BEGIN
SET seats = true //assume seats are available
SET bookingConfirmed = false
SET DateTime //current date and time
INPUT movieStartTime
INPUT guestNumber
IF guestNumber < 4 AND
    IF movieStartTime - DateTime >= 2 hours
    SET bookingPending = true
        ELSE
            IF guestNumber >= 4 THEN
                SET bookingConfirmed = true
            ENDIF
        ENDIF
ENDIF
        BEGIN bookingPending
        //module to handle bookings for fewer than 4 guests
        END
        BEGIN bookingConfirmed
        //module to handle bookings for 4 or more guests
        END
END

The algorithm is incomplete. What is the best way to make the algorithm more efficient?

A

Use modularisation to suggest an alternative movieStartTime for bookingPending.

B

Add an algorithm to determine seat allocation, ensuring groups sit two seats apart.

C

Calculate movieStartTime - DateTime and set as a Boolean.

D

Use a FOR loop to check the parameters for bookingConfirmed.

Reveal Answer
A

Use modularisation to suggest an alternative movieStartTime for bookingPending.

This option suggests adding a new feature (suggesting alternative times) rather than improving the efficiency or structure of the current algorithm.

B

Add an algorithm to determine seat allocation, ensuring groups sit two seats apart.

While seat allocation is a necessary functional requirement, this option describes what to do rather than how to improve the algorithm's efficiency. Option D provides the specific control structure needed to implement this.

C

Calculate movieStartTime - DateTime and set as a Boolean.

Pre-calculating the time difference and storing it as a Boolean improves code readability but has a negligible impact on the computational efficiency of the algorithm.

D

Use a FOR loop to check the parameters for bookingConfirmed.

Correct Answer

To confirm a booking, the system must verify that there are enough available seats in the theatre's seating plan (an array or grid). A FOR loop is the most efficient way to iterate through the seat data structure to check these parameters and find a suitable block of seats.

Q10
2023
QCAA
1 mark
Q10
1 mark

The table shown is named 'Planets' and is stored in a database.

NameMoonsDiameterGravityMean temperature
Mercury04 8793.7167
Venus012 1048.9464
Earth112 7569.815
Mars26 7923.7– 65

Which SQL query will return the name and mean temperature of any planet with a diameter less than 50 000, ordered in descending order of mean temperature?

A
SELECT Name, MeanTemperature
FROM Planets
WHERE Diameter < 50000
AND ORDER BY MeanTemperature DESC
B
SELECT Name, MeanTemperature
FROM Planets
WHERE Diameter < 50000
ORDER BY MeanTemperature DESCENDING
C
SELECT Name, MeanTemperature
FROM Planets
WHERE Diameter < 50000
ORDER BY MeanTemperature DESC
D
SELECT Name, MeanTemperature
FROM Planets
WHERE Diameter < 50000 AND
ORDER BY MeanTemperature DESC
Reveal Answer
A
SELECT Name, MeanTemperature
FROM Planets
WHERE Diameter < 50000
AND ORDER BY MeanTemperature DESC

This option is incorrect because the AND operator cannot be used to connect the WHERE clause to the ORDER BY clause; ORDER BY is a separate statement that follows the filtering logic.

B
SELECT Name, MeanTemperature
FROM Planets
WHERE Diameter < 50000
ORDER BY MeanTemperature DESCENDING

This option is incorrect because the standard SQL keyword for sorting in descending order is DESC, not DESCENDING.

C
SELECT Name, MeanTemperature
FROM Planets
WHERE Diameter < 50000
ORDER BY MeanTemperature DESC
Correct Answer

This is the correct query. It properly selects the columns, filters the rows using WHERE Diameter < 50000, and sorts the results using the standard ORDER BY ... DESC syntax.

D
SELECT Name, MeanTemperature
FROM Planets
WHERE Diameter < 50000 AND
ORDER BY MeanTemperature DESC

This option is incorrect because it places an AND operator at the end of the WHERE clause before ORDER BY, which causes a syntax error.

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.

Q9
2021
QCAA
1 mark
Q9
1 mark

The table describes a sample of the personalised numberplate range for Queensland.

RangeClassicEmoji
DescriptionCombination of 3 numeric characters and 3 alphabetic charactersCombination of 5 alphanumeric characters and 1 emoji

Which SQL statement is correct for ordering a new personalised numberplate?

A
CREATE TABLE orders
product_range = ‘classic_theme’,
combination = ‘YIP333’
customerId = 123;
B
INSERT INTO orders (customerId, product_range, combination)
VALUES (123,‘classic_theme’,‘YIP333’)
C
UPDATE orders
SET product_range = ‘classic_theme’, combination = ‘YIP333’
WHERE customerId = 123;
D
ALTER TABLE orders
SET product_range = ‘classic_theme’, combination = ‘YIP333’
WHERE customerId = 123;
Reveal Answer
A
CREATE TABLE orders
product_range = ‘classic_theme’,
combination = ‘YIP333’
customerId = 123;

This is incorrect because CREATE TABLE is used to define the structure of a new table, not to add data to an existing one. Furthermore, the syntax shown is invalid for creating a table.

B
INSERT INTO orders (customerId, product_range, combination)
VALUES (123,‘classic_theme’,‘YIP333’)
Correct Answer

This is correct because the INSERT INTO statement is the standard SQL command used to add a new row (record) of data into a table, which corresponds to placing a new order.

C
UPDATE orders
SET product_range = ‘classic_theme’, combination = ‘YIP333’
WHERE customerId = 123;

This is incorrect because UPDATE is used to modify existing records. Ordering a new item requires creating a new record rather than changing data in an existing one.

D
ALTER TABLE orders
SET product_range = ‘classic_theme’, combination = ‘YIP333’
WHERE customerId = 123;

This is incorrect because ALTER TABLE is a Data Definition Language (DDL) command used to modify the structure of a table (e.g., adding columns), not to insert or update specific data rows.

Q10
2020
QCAA
1 mark
Q10
1 mark

In a game, scores are averaged for players in the same team. Each team consists of five players. Player names and scores are to be stored in arrays.

The referee was given the first version of the algorithm, which they then improved to create the second version.

First version

ProcessGroup (name[], score[])
BEGIN
    SET total = 0
    PRINT name[1]
    CALCULATE total = total + score[1]
    PRINT name[2]
    CALCULATE total = total + score[2]
    PRINT name[3]
    CALCULATE total = total + score[3]
    PRINT name[4]
    CALCULATE total = total + score[4]
    PRINT name[5]
    CALCULATE total = total + score[5]
    CALCULATE average = total / 5
    PRINT average
END

Second version

ProcessGroup (name[], score[])
BEGIN
    SET groupSize = 5
    SET count = 0
    SET total = 0
    WHILE count < groupSize
        PRINT name[count]
        CALCULATE total = total + score[count]
        INCREMENT count
    ENDWHILE
    CALCULATE average = total / groupSize
    PRINT average
END

Which features of good algorithms have been improved in the second version?

A

efficiency, effectiveness

B

reliability, effectiveness

C

maintainability, efficiency

D

reliability, maintainability

Reveal Answer
A

efficiency, effectiveness

Effectiveness refers to whether the algorithm solves the problem correctly. Since both versions calculate the correct average, the effectiveness has not changed.

B

reliability, effectiveness

Neither reliability nor effectiveness is the primary improvement. Both algorithms are reliable and effective for a fixed group of 5, but the second version is better structured.

C

maintainability, efficiency

Correct Answer

The second version is more maintainable because changing the team size only requires updating the groupSize variable rather than adding new lines of code. It is more efficient (concise and scalable) because it avoids code repetition.

D

reliability, maintainability

While maintainability is improved, reliability is not the main distinction. The first version is reliable for the specific case of 5 players; the loop primarily improves how the code is written and scaled (efficiency).

Q3
2020
QCAA
1 mark
Q3
1 mark

This data dictionary is for a table containing data on basketball players in a professional league.

Table: players

Column nameData typePrimary key?Length
playernumberVARCHARYes2
playerheightINTEGER  
playernameTEXT  
teamnameVARCHARYes10

The following SQL query returned an error on execution:

INSERT INTO players (teamname, playernumber, playername, playerheight)
VALUES ('Raptors', '2', 'Edward Lee', 183.5);

Which column needs to be adjusted for the query to work?

A

playernumber

B

playerheight

C

playername

D

teamname

Reveal Answer
A

playernumber

The value '2' is a string with a length of 1, which fits perfectly within the defined VARCHAR(2) constraint.

B

playerheight

Correct Answer

The query attempts to insert 183.5 (a decimal value), but the column is defined as INTEGER. To store decimal values, the data type must be changed to FLOAT or DECIMAL.

C

playername

The value 'Edward Lee' is a standard string that is fully compatible with the TEXT data type.

D

teamname

The string 'Raptors' contains 7 characters, which is within the limit of the VARCHAR(10) definition.

Q9
2020
QCAA
1 mark
Q9
1 mark

This table contains the posts published to a rock climbing group on a social networking site.

Table: posts

DateAuthorContentLikes
15/06/2019Lui ChanWould anyone like to rock climb tomorrow?5
15/06/2019Lui ChanWho is going to the boulder festival?15
14/06/2019Lui ChanWho wants to go to yoga tonight?7
14/06/2019Amy SmithHas anyone picked up a chalk bag?9

An SQL query is executed:

SELECT Date, Author, SUM(Likes)
FROM Posts
GROUP BY Date, Author

What is the output of this query?

A
DateAuthorContentSUM(Likes)
15/06/2019Lui ChanWould anyone like to rock climb tomorrow?20
14/06/2019Lui ChanWho wants to go to yoga tonight?7
14/06/2019Amy SmithHas anyone picked up a chalk bag?9
B
DateAuthorSUM(Likes)
15/06/2019Lui Chan27
14/06/2019Amy Smith9
C
DateAuthorSUM(Likes)
14/06/2019  
15/06/2019Lui Chan27
14/06/2019Amy Smith9
D
DateAuthorSUM(Likes)
15/06/2019Lui Chan20
14/06/2019Lui Chan7
14/06/2019Amy Smith9
Reveal Answer
A
DateAuthorContentSUM(Likes)
15/06/2019Lui ChanWould anyone like to rock climb tomorrow?20
14/06/2019Lui ChanWho wants to go to yoga tonight?7
14/06/2019Amy SmithHas anyone picked up a chalk bag?9

This option incorrectly includes the Content column. The SQL query only specifies SELECT Date, Author, SUM(Likes), so Content should not appear in the output.

B
DateAuthorSUM(Likes)
15/06/2019Lui Chan27
14/06/2019Amy Smith9

This option incorrectly groups all of Lui Chan's posts together regardless of the date (summing 5+15+7=275 + 15 + 7 = 27). Since the query uses GROUP BY Date, Author, posts by the same author on different dates must remain in separate rows.

C
DateAuthorSUM(Likes)
14/06/2019  
15/06/2019Lui Chan27
14/06/2019Amy Smith9

This option displays incorrect sums and row structures. It aggregates all of Lui Chan's likes into one value (2727) despite the different dates and includes a row with missing data that would not be generated by a standard GROUP BY clause.

D
DateAuthorSUM(Likes)
15/06/2019Lui Chan20
14/06/2019Lui Chan7
14/06/2019Amy Smith9
Correct Answer

This option correctly groups the data by both Date and Author. Lui Chan has two distinct groups (15/06 with 5+15=205+15=20 likes, and 14/06 with 77 likes), while Amy Smith has one group (14/06 with 99 likes).

Frequently Asked Questions

How many QCAA Digital Solutions questions cover Innovative digital solutions?
AusGrader has 22 QCAA Digital Solutions questions on Innovative digital solutions, 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