Question 2

AQA Computer Science June 2025 Paper 1C (8525/1C)GCSE7 marks

On the specification

2.1
3.2 Programming
2.2
3.2 Programming
Question text

2 A coffee shop has a loyalty scheme which rewards customers for buying drinks. box The customer gets one stamp on their loyalty card for each individual drink they buy. • Every 4th stamp on the card gets the customer a free biscuit. • Every 5th stamp on the card gets the customer a free pastry. • When the customer reaches 20 stamps, they get a free cake (but no biscuit or pastry). The VB.NET program shown in Figure 2 should display whether the customer gets a free biscuit, pastry, cake or nothing free for their first 20 drinks. For each drink purchased, the program must output either: "Free biscuit", "Free pastry", "Free cake" or "Nothing free". Some parts of the program have been replaced with the labels to . Figure 2 Dim i As Integer = 1 While i <= 20 If i Mod 20 = 0 Then Console.WriteLine("Free cake") ElseIf Then Console.WriteLine ("Free pastry") ElseIf i Mod 4 = 0 Then Else End If i = i + 1 End While 2.1 State the VB.NET code that should be written in place of the labels in the program written in Figure 2. [3 marks] 2.2 The coffee shop wants to work out the total value of the free biscuits, pastries and box cakes given out each day. • Each free biscuit is worth £1 • Each free pastry is worth £2.50 • Each free cake is worth £3 Write a VB.NET program to get the number of free biscuits, pastries and cakes, and calculate the total value for the day. Your program must: • get the user to enter the number of free biscuits and store it in a variable • get the user to enter the number of free pastries and store it in a variable • get the user to enter the number of free cakes and store it in a variable • calculate the total value of the free items • output the total value of the free items. You should use meaningful variable name(s) and VB.NET syntax in your answer. The answer grid below contains vertical lines to help you indent your code. [4 marks]