Question 7
AQA Computer Science June 2024 Paper 1A (8525/1A)GCSE4 marks
On the specification
- 3.2 Programming
Question text
7 A shop owner wants to create stock codes for each type of sweet they sell. box Figure 5 shows some of the sweets. Figure 5 sweetID sweetName brand S1 WINE GUMS MAYNARDS S2 COLA CUBES BERRYMANS S3 STARBURST WRIGLEY A stock code is made up of the: • sweetID • first letter and the second letter in sweetName • first letter of the brand For example: • the stock code for WINE GUMS would be S1WIM • the stock code for STARBURST would be S3STW Write a C# program to create the stock code for a sweet. The program should: • get the user to enter the sweetID, sweetName and brand • create the stock code • assign the stock code to a variable called code You should use meaningful variable name(s) and C# syntax in your answer. The answer grid below contains vertical lines to help you indent your code. [4 marks]