100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.2 TrustPilot
logo-home
Exam (elaborations)

2024_AQA: AS COMPUTER SCIENCE Paper 1 (Merged Question paper and marking scheme): Tuesday 14 May 2024 AS COMPUTER SCIENC

Rating
-
Sold
-
Pages
59
Grade
A+
Uploaded on
04-02-2025
Written in
2024/2025

2024_AQA: AS COMPUTER SCIENCE Paper 1 (Merged Question paper and marking scheme): Tuesday 14 May 2024 AS COMPUTER SCIENCE Paper 1 Tuesday 14 May 2024 Materials For this paper you must have:  a computer  a printer  appropriate software  the Electronic Answer Document Afternoon Time allowed: 1 hour 45 minutes  an electronic version and a hard copy of the Skeleton Program  an electronic version and a hard copy of the Preliminary Material  an electronic version of the Data File SimulationD You must not use a calculator. Instructions  Type the information required on the front of your Electronic Answer Document.  Before the start of the examination make sure your Centre Number, Candidate Name and Candidate Number are shown clearly in the footer of every page (not the front cover) of your Electronic Answer Document.  Enter your answers into the Electronic Answer Document.  Answer all questions.  Save your work at regular intervals. Information  The marks for questions are shown in brackets.  The maximum mark for this paper is 75.  No extra time is allowed for printing and collating.  The question paper is divided into three sections. Advice You are advised to allocate time to each section as follows: Section A – 20 minutes; Section B – 25 minutes; Section C – 60 minutes. At the end of the examination Tie together all your printed Electronic Answer Document pages and hand them to the Invigilator. Warning It may not be possible to issue a result for this paper if your details are not on every page of your Electronic Answer Document. AS Computer Science Paper 1 - Key Areas to Revise Paper 1 of AS Computer Science focuses on the fundamentals of computer systems, programming, and problem-solving. Key areas to revise include: 1. Fundamentals of Programming:  Programming Concepts: Understand key programming concepts such as variables, constants, data types (e.g., integers, strings, booleans), and operators (e.g., arithmetic, logical, relational).  Control Structures: Review conditional statements (if, if-else, switch) and looping constructs (for, while, do while). Understand how these are used to control program flow.  Functions and Procedures: Be familiar with how to define and use functions and procedures, including parameters and return values.  Data Structures: Revise the use of arrays, lists, tuples, dictionaries, and other basic data structures. Be able to implement and manipulate them in programs.  Algorithms: Study common algorithms 2. Data Representation:  Binary and Hexadecimal: Understand how data is represented in binary and hexadecimal formats. Be able to convert between decimal, binary, and hexadecimal numbers.  Character Encoding: Review character encoding schemes like ASCII and Unicode, and how characters are represented in computers.  Data Storage: Understand how data is stored in computers, including the concepts of bits, bytes, and file sizes. Revise how data is organized in files (e.g., text files, image files) and the basic principles of compression. 3. Computer Systems:  Hardware and Software: Review the key components of a computer system (e.g., CPU, memory, input/output devices) and the distinction between hardware and software.  The Fetch-Decode-Execute Cycle: Understand the process by which instructions are processed by the CPU, including the roles of the ALU (Arithmetic Logic Unit), CU (Control Unit), and registers.  Operating Systems: Understand the role of an operating system (e.g., managing resources, handling user inputs, memory management, file systems). 4. Problem Solving:  Problem-Solving Techniques: Be prepared to use algorithms and flowcharts to solve problems. Practice breaking down problems into smaller tasks and developing algorithms to solve them efficiently.  Pseudocode: Be comfortable writing pseudocode to represent algorithms, ensuring it is clear, logical, and easy to understand. 5. Networks and Communication:  Networking Fundamentals: OSI and TCP/IP Models & Wireless Communication: 6. Databases:  Database Concepts: SQL: 7. Software Development Lifecycle:  Development Process & Testing and Debugging. 7516/1 IB/M/Jun24/G4001/E7 2 Section A You are advised to spend no more than 20 minutes on this section. Enter your answers to Section A in your Electronic Answer Document. You must save this document at regular intervals. Question 04 in this section asks you to write program code starting from a new program/project/file. You are advised to save your program at regular intervals. 0 1 Figure 1 S1  "011101" S2  "001100" C  "0" R  "" FOR J = 0 TO 5 X  5 - J D1  S1[X] D2  S2[X] IF C = "0" THEN IF D1 = D2 THEN S  "0" C  D1 ELSE S  "1" ENDIF ELSE IF D1 = D2 THEN S  "1" C  D1 ELSE S  "0" ENDIF ENDIF R  CONCATENATE(S, R) ENDFOR OUTPUT R The function CONCATENATE(X, Y) returns the string formed by concatenating the string Y to the end of string X. For example, CONCATENATE("cat", "dog") returns "catdog". The strings are zero index based. IB/M/Jun24/7516/1 3 Complete Table 1 by hand-tracing the algorithm in Figure 1. You may not need to use all the rows in Table 1. You do not need to indicate that C, D1, D2 and S are strings. The first row of Table 1 has already been completed for you. Table 1 S1 S2 C R J X D1 D2 S "011101" "001100" "0" "" OUTPUT: Copy the contents of all the unshaded cells in Table 1 into your Electronic Answer Document. [5 marks] Turn over ► IB/M/Jun24/7516/1 4 0 2 A program uses both local and global variables. 0 2 . 1 State two differences between local and global variables. 0 2 . 2 Give two reasons why it is good practice to use local variables. [2 marks] [2 marks] 0 3 Programmers are encouraged to adopt a structured approach to writing programs. Explain three reasons for adopting the structured approach. 0 4 Figure 2 shows an algorithm represented using pseudo-code. Figure 2 OUT_NOLF "Enter an integer: " INPUT Number1 OUT_NOLF "Enter another integer: " INPUT Number2 IF Number1 > Number2 THEN Number  Number1 DIV Number2 ELSE Number  Number2 DIV Number1 ENDIF Count  0 WHILE Count ≠ Number Count  Count + 1 IF (Count MOD 10) = 0 THEN OUT_NOLF "X" ELSE IF (Count MOD 5) = 0 THEN OUT_NOLF "V" ELSE OUT_NOLF "/" ENDIF ENDIF ENDWHILE [3 marks] The OUT_NOLF command displays the output without a line feed. The following series of OUT_NOLF commands will display ABC: OUT_NOLF "A" OUT_NOLF "B" OUT_NOLF "C" IB/M/Jun24/7516/1 5 Table 2 lists the MOD and DIV operators for each of the available programming languages. You should refer to the row for your programming language. Table 2 Programming language MOD C# DIV % Java / % Pascal / mod Python div % VB.NET // Mod What you need to do: Task 1 Write a program to implement the algorithm in Figure 2. Task 2 Test that your program works:  run your program  enter 4  enter 99 Evidence that you need to provide Include the following evidence in your Electronic Answer Document. 0 4 . 1 Your PROGRAM SOURCE CODE for Task 1. 0 4 . 2 SCREEN CAPTURE(S) showing the test described in Task 2. [8 marks] [1 mark] Turn over ► IB/M/Jun24/7516/1 6 Section B You are advised to spend no more than 25 minutes on this section. Enter your answers to Section B in your Electronic Answer Document. You must save this document at regular intervals. These questions refer to the Preliminary Material and the Skeleton Program, but do not require any additional programming. Refer either to the Preliminary Material issued with this question paper or your electronic copy. 0 5 . 1 State the most appropriate data type to use for numbers with a fractional part, for example 12.79. [1 mark] 0 5 . 2 State the identifier of a variable in the Skeleton Program that is used to hold a number with a fractional part. [1 mark] 0 6 . 1 State the most appropriate data type to use for values that may consist of more than one character. [1 mark] 0 6 . 2 State the identifier of a variable in the Skeleton Program that is used to hold more than one character. [1 mark] 0 7 State the name of an identifier for a subroutine defined in the Skeleton Program that returns a single digit number. [1 mark] 0 8 This question refers to the subroutine CalculateServingTime. Explain the reason for adding the value 1 to the result of dividing NoOfItems by TILL_SPEED. 0 9 This question refers to the subroutine QueueSimulator. [1 mark] Why might the subroutine Serving be called repeatedly after the specified time for the simulation has finished? [2 marks] IB/M/Jun24/7516/1 7 1 0 The Skeleton Program uses a number of data structures. 1 0 . 1 State the identifier of a data structure that stores values of a user-defined data type. [1 mark] 1 0 . 2 State the identifier of a data structure that stores values of only one built-in data type. [1 mark] 1 1 . 1 Explain what is meant by composition and give an example where composition is used in the Skeleton Program. [2 marks] 1 1 . 2 Describe two reasons why composition is used in the Skeleton Program. [2 marks] 1 2 What is the named constant TIME_SERVING used for and what is the benefit of using a named constant in this way? [2 marks] 1 3 This question refers to the subroutine ServeBuyer. 1 3 . 1 Describe the purpose of the statements within the FOR loop. [2 marks] 1 3 . 2 What aspect of a shop do the FOR loop and the statements inside it simulate? 1 4 One of the statistics calculated is average queue length. This is calculated using the data structure Stats. [1 mark] 1 4 . 1 Describe how some of the values in Stats are used to calculate the average queue length in the subroutine OutputStats. [1 mark] 1 4 . 2 Describe how the relevant values in Stats are updated in the subroutine Serving to enable the calculation in the subroutine OutputStats to produce the correct result. [2 marks] 1 5 In the Skeleton Program buyers join a single queue and are then served at one of several tills. Outline the design changes needed for buyers to form a separate queue for each till. You are not expected to actually make the changes. [2 marks] Turn over ► IB/M/Jun24/7516/1 8 Section C You are advised to spend no more than 60 minutes on this section. Enter your answers to Section C in your Electronic Answer Document. You must save this document at regular intervals. These questions require you to load the Skeleton Program and to make programming changes to it. 1 6 This question extends the functionality of the Skeleton Program. When a buyer enters the shop and sees a long queue, they will change their mind and leave the shop without buying anything. This is known as a shun. The Skeleton Program is to be changed so that a buyer shunning the queue will cause the shop to open another till, subject to the maximum number of tills available not being exceeded. The subroutine BuyerArrives needs to be modified so that a buyer arriving when the queue length is 5 will not join the queue. A running total of the number of buyers shunning the queue is to be kept. After a buyer has shunned the queue, the shop will open another till, until the maximum number of tills available have opened. At the end of the simulation the number of buyers that have shunned the queue should be output as part of the statistics. What you need to do: Task 1 Create a constant value to use as an index for a previously unused element of the data structure Stats in which to store the count of the number of shuns. Task 2 Amend the subroutine BuyerArrives so that a buyer only joins the queue when fewer than 5 buyers are in the queue and shuns the queue if there are 5 buyers in the queue. If a buyer shuns the queue, the number of shuns and the number of tills operating should be updated as appropriate and a suitable message showing the ID of the buyer that has shunned the queue should be displayed. Task 3 Amend the subroutine OutputStats to output the total number of shuns with an appropriate message. IB/M/Jun24/7516/1 9 Task 4 Test that the changes you have made work by conducting the following test:  run your amended Skeleton Program  enter Y  enter 50  enter 1 Evidence that you need to provide Include the following evidence in your Electronic Answer Document. 1 6 . 1 Your PROGRAM SOURCE CODE:  that sets the value of the new constant  for the entire subroutine BuyerArrives  for the entire subroutine OutputStats. 1 6 . 2 SCREEN CAPTURE(S) showing the requested test described in Task 4. [7 marks] The SCREEN CAPTURE(S) only need to show the simulation statistics that are displayed when the simulation finishes. [1 mark] Turn over for the next question Turn over ► IB/M/Jun24/7516/1 10 1 7 This question extends the functionality of the Skeleton Program, so that the length of time it takes to serve a buyer depends on the speed of the till operator. The speed of the till operator is the number of items they can handle in a time unit. The simulation is to calculate the serving time for a buyer based upon the number of items in the buyer’s basket and the speed of the till operator. The speed of each till operator needs to be stored for each till. What you need to do: Task 1 An extra value is required for each element of Tills, representing the speed of the operator at a till. Amend the declaration for Tills. Task 2 Amend the subroutine ResetDataStructures so that the extra values are set so that till 0 has an operator speed of 7 and till 1 has an operator speed of 6. Each subsequent till should have its operator speed set to a value 1 less than the previous till. Task 3 Amend the subroutine ChangeSettings so that it requires the user to set the till speed of each till in use. The user should be given information about which till they are setting the current till operator speed of and the current default value. ChangeSettings will require Tills as a parameter and, depending on your language, as a return value, so the call to this subroutine will also need amending. Task 4 Amend the subroutine CalculateServingTime so that the serving time depends on the speed of the till operator at the till that is being used. Task 5 Test that the changes you have made work by conducting the following test:  run your amended Skeleton Program  enter Y  enter 6  enter 3  enter 3  enter 2  enter 1 IB/M/Jun24/7516/1 11 Evidence that you need to provide Include the following evidence in your Electronic Answer Document. 1 7 . 1 Your PROGRAM SOURCE CODE for the entire subroutine ResetDataStructures, the entire subroutine ChangeSettings and the entire subroutine CalculateServingTime and any code that you have changed or added to the Skeleton Program. [8 marks] 1 7 . 2 SCREEN CAPTURE(S) showing the requested test described in Task 5. The SCREEN CAPTURE(S) only need to show the entire output for time unit 5. [1 mark] Turn over for the next question Turn over ► IB/M/Jun24/7516/1 12 1 8 This question extends the functionality of the Skeleton Program. Till 0 is not currently used. It is to be used as the express till that buyers with fewer than 10 items in their basket can use. If till 0 is idle, the next buyer in the queue with fewer than 10 items in their basket comes out of the queue and gets served at till 0. What you need to do: Task 1 Write a new subroutine ServeBuyerExpress that:  finds the first buyer in the queue who has fewer than ten items in their basket and if there is one: o removes the buyer’s details from the queue o closes the gap in the queue o displays the buyer’s ID o calls the UpdateStats subroutine for the express till o calls the CalculateServingTime subroutine for the express till. Task 2 Amend the subroutine Serving to check whether the express till is free and, if it is, call the subroutine ServeBuyerExpress before checking the availability of other tills. Task 3 Amend the subroutine OutputTillAndQueueStates to output the data for till 0 as well as the data about the other tills which it already outputs. Task 4 Test that the changes you have made work by conducting the following test:  run your amended Skeleton Program  enter N Evidence that you need to provide Include the following evidence in your Electronic Answer Document. 1 8 . 1 Your PROGRAM SOURCE CODE for the entire subroutine ServeBuyerExpress, the entire subroutine Serving and the entire subroutine OutputTillAndQueueStates. 1 8 . 2 SCREEN CAPTURE(S) showing the requested test described in Task 4. [12 marks] The SCREEN CAPTURE(S) only need to show the entire output for time unit 8. [1 mark] END OF QUESTIONS IB/M/Jun24/7516/1 13 There are no questions printed on this page IB/M/Jun24/7516/1 14 There are no questions printed on this page IB/M/Jun24/7516/1 15 There are no questions printed on this page IB/M/Jun24/7516/1 16 There are no questions printed on this page Copyright information For confidentiality purposes, all acknowledgements of third-party copyright material are published in a separate booklet. This booklet is published after each live examination series and is available for free download from . Permission to reproduce all copyright material has been applied for. In some cases, efforts to contact copyright-holders may have been unsuccessful and AQA will be happy to rectify any omissions of acknowledgements. If you have any queries please contact the Copyright Team. Copyright © 2024 AQA and its licensors. All rights reserved. IB/M/Jun24/7516/1 AS COMPUTER SCIENCE 7516/1 Paper 1 Mark scheme June 2024 Version: 1.0 Final MARK SCHEME – AS COMPUTER SCIENCE – 7516/1 – JUNE 2024 Mark schemes are prepared by the Lead Assessment Writer and considered, together with the relevant questions, by a panel of subject teachers. This mark scheme includes any amendments made at the standardisation events which all associates participate in and is the scheme which was used by them in this examination. The standardisation process ensures that the mark scheme covers the students’ responses to questions and that every associate understands and applies it in the same correct way. As preparation for standardisation each associate analyses a number of students’ scripts. Alternative answers not already covered by the mark scheme are discussed and legislated for. If, after the standardisation process, associates encounter unusual answers which have not been raised they are required to refer these to the Lead Examiner. It must be stressed that a mark scheme is a working document, in many cases further developed and expanded on the basis of students’ reactions to a particular paper. Assumptions about future mark schemes on the basis of one year’s document should be avoided; whilst the guiding principles of assessment remain constant, details will change, depending on the content of a particular examination paper. No student should be disadvantaged on the basis of their gender identity and/or how they refer to the gender identity of others in their exam responses. A consistent use of ‘they/them’ as a singular and pronouns beyond ‘she/her’ or ‘he/him’ will be credited in exam responses in line with existing mark scheme criteria. Further copies of this mark scheme are available from Copyright information AQA retains the copyright on all its publications. However, registered schools/colleges for AQA are permitted to copy material from this booklet for their own internal use, with the following important exception: AQA cannot give permission to schools/colleges to photocopy any material that is acknowledged to a third party even for internal use within the centre. Copyright © 2024 AQA and its licensors. All rights reserved. 2 MARK SCHEME – AS COMPUTER SCIENCE – 7516/1 – JUNE 2024 AS Computer Science Paper 1 (7516/1) – applicable to all programming languages A, B, C, D and E June 2024 The following annotation is used in the mark scheme: ; - means a single mark // - means alternative response / - means an alternative word or sub-phrase A. - means acceptable creditworthy answer R. - means reject answer as not creditworthy NE. - means not enough I. - means ignore DPT. - means ‘Don't penalise twice’. In some questions a specific error made by a candidate, if repeated, could result in the loss of more than one mark. The DPT label indicates that this mistake should only result in a candidate losing one mark, on the first occasion that the error is made. Provided that the answer remains understandable, subsequent marks should be awarded as if the error was not being repeated. 3 MARK SCHEME – AS COMPUTER SCIENCE – 7516/1 – JUNE 2024 Level of response marking instructions Level of response mark schemes are broken down into levels, each of which has a descriptor. The descriptor for the level shows the average performance for the level. There are marks in each level. Before you apply the mark scheme to a student’s answer read through the answer and annotate it (as instructed) to show the qualities that are being looked for. You can then apply the mark scheme. Step 1 Determine a level Start at the lowest level of the mark scheme and use it as a ladder to see whether the answer meets the descriptor for that level. The descriptor for the level indicates the different qualities that might be seen in the student’s answer for that level. If it meets the lowest level then go to the next one and decide if it meets this level, and so on, until you have a match between the level descriptor and the answer. With practice and familiarity you will find that for better answers you will be able to quickly skip through the lower levels of the mark scheme. When assigning a level you should look at the overall quality of the answer and not look to pick holes in small and specific parts of the answer where the student has not performed quite as well as the rest. If the answer covers different aspects of different levels of the mark scheme you should use a best fit approach for defining the level and then use the variability of the response to help decide the mark within the level, ie if the response is predominantly level 3 with a small amount of level 4 material it would be placed in level 3 but be awarded a mark near the top of the level because of the level 4 content. Step 2 Determine a mark Once you have assigned a level you need to decide on the mark. The descriptors on how to allocate marks can help with this. The exemplar materials used during standardisation will help. There will be an answer in the standardising materials which will correspond with each level of the mark scheme. This answer will have been awarded a mark by the Lead Examiner. You can compare the student’s answer with the example to determine if it is the same standard, better or worse than the example. You can then use this to allocate a mark for the answer based on the Lead Examiner’s mark on the example. You may well need to read back through the answer as you apply the mark scheme to clarify points and assure yourself that the level and the mark are appropriate. Indicative content in the mark scheme is provided as a guide for examiners. It is not intended to be exhaustive and you must credit other valid points. Students do not have to cover all of the points mentioned in the Indicative content to reach the highest level of the mark scheme. An answer which contains nothing of relevance to the question must be awarded no marks. 4 MARK SCHEME – AS COMPUTER SCIENCE – 7516/1 – JUNE 2024 Examiners are required to assign each of the candidate’s responses to the most appropriate level according to its overall quality, and then allocate a single mark within the level. When deciding upon a mark in a level, examiners should bear in mind the relative weightings of the assessment objectives. eg In question 11.1, the marks available are as follows: AO1 (knowledge) 1 mark AO2 (analyse) 1 mark In question 17.1, the marks available for the AO3 elements are as follows: AO3 (design) 2 marks AO3 (programming) 6 marks In question 18.1, the marks available for the AO3 elements are as follows: AO3 (design) 3 marks AO3 (programming) 9 marks Where a candidate’s answer only reflects one element of the AO, the maximum mark they can receive will be restricted accordingly. 5 MARK SCHEME – AS COMPUTER SCIENCE – 7516/1 – JUNE 2024 Section A Qu Marks 01 5 marks for AO2 (application) 1 mark for each correct set of values in the correct sequence (boxed in red); I. missing quotes I. duplicated values in a column If, after marking according to the boxed sections, fewer than 3 marks are awarded, 1 mark can be awarded for each of the following, up to a maximum total of 3: Column C completely correct; Column R completely correct; Columns J, X, D1, D2 and S all completely correct; Max 4 if any errors 5 6 S1 S2 C R J X D1 D2 S "011101" "001100" "0" "" 0 5 "1" "0" "1" "1" 1 4 "0" "0" "0" "0" "01" 2 3 "1" "1" "0" "1" "001" 3 2 "1" "1" "1" "1" "1001" 4 1 "1" "0" "0" "1" "01001" 5 0 "0" "0" "1" "0" "101001" OUTPUT: "101001" MARK SCHEME – AS COMPUTER SCIENCE – 7516/1 – JUNE 2024 Qu Marks 02 1 2 marks for AO1 (understanding) Global variables accessible to all parts of the program // local variables accessible only in the program block/subroutine in which it was declared; Local variables declared in subroutine // global variable declared in main program block/outside subroutines; Local variables only use memory/exist while the program block/subroutine (in which they are declared) is executing; Max 2 2 02 2 2 marks for AO1 (understanding) Using local variables makes subroutine self-contained; Using local variables aids modularisation; Local variables use less memory // memory allocated to local variables can be reused when subroutine not in use; Variable names can be reused (in other parts of the program); Code is easier to re-use in other programs; A. Prevents unintended side-effects A. Easier debugging/maintenance/testing Max 2 2 03 3 marks for AO1 (understanding) Can get an overview of (the structure of) the program // code is easier to understand; Can break problem down into sub-tasks; Can re-use subroutines/modules; A. less duplication of code Can distribute (implementation of) subroutines/modules among team; Can test subroutines/modules independently // quicker/easier to debug/maintain // easier to locate errors; Max 3 3 7 MARK SCHEME – AS COMPUTER SCIENCE – 7516/1 – JUNE 2024 Qu Marks 04 1 8 marks for AO3 (programming) Mark as follows: 1. Correct variable declarations for Number1, Number2, Number, Count and initialisation; Note to examiners: If a language allows variables to be used without explicit declaration, (eg Python), then this mark should be awarded if the correct variables exist in the program code and the first value they are assigned is of the correct data type. 2. Correct prompts "Enter an integer: " and Number1 assigned integer value entered by user and "Enter another integer: " and Number2 assigned integer value entered by user; 3. Correct IF THEN ELSE statement syntax allowed by the programming language and correct condition; 4. Correct assignments to Number in THEN and ELSE part; 5. Loop iterates correct number of times; 6. Correct condition to output X; 7. Correct condition to output V; 8. Correct output within loop without line feed; I. case and minor typos Max 7 if code does not function correctly 8 04 2 Mark is for AO3 (evaluate) **** SCREEN CAPTURE **** Must match code from 04.1. Code for 04.1 must be sensible. Screen capture showing: Enter an integer: 4 Enter another integer: 99 ////V////X////V////X//// 1 8 MARK SCHEME – AS COMPUTER SCIENCE – 7516/1 – JUNE 2024 Section B Qu Marks 05 1 Mark is for AO1 (knowledge) real/float/single/double/decimal; 1 05 2 Mark is for AO2 (analyse) AverageWaitingTime/AverageQLength; R. if any additional code R. if spelt incorrectly I. case and spacing 1 06 1 Mark is for AO1 (knowledge) String; A. str A. an array/list of characters I. case 1 06 2 Mark is for AO2 (analyse) Answer / DataString / ThisBuyerID; A. BLANK (Python only) A. input, output, format (Java only) A. BuyerID R. self.BuyerID R. if any additional code R. if spelt incorrectly I. case and spacing Max 1 1 07 Mark is for AO2 (analyse) FindFreeTill/ChangeSettings; R. if any additional code R. if spelt incorrectly I. case and spacing 1 9 MARK SCHEME – AS COMPUTER SCIENCE – 7516/1 – JUNE 2024 Qu Marks 08 Mark is for AO2 (analyse) Otherwise there could be a serving time of 0; Should round up to the (whole) number of time units needed; A. by example such as: if speed = 3, items = 8 then this will take more than 2 time units. Max 1 1 09 2 marks for AO2 (analyse) To finish serving all (waiting) buyers // there might be buyers left who haven’t been served; … and include them in the statistics; A. example of any statistic listed in the simulation statistics output. 2 10 1 Mark is for AO2 (analyse) BuyerQ; R. if any additional code R. if spelt incorrectly I. case and spacing 1 10 2 Mark is for AO2 (analyse) Stats / Tills / Data; A. buyerInfo (Java only) R. if any additional code R. if spelt incorrectly I. case and spacing Max 1 1 10 MARK SCHEME – AS COMPUTER SCIENCE – 7516/1 – JUNE 2024 Qu Marks 11 1 Procedural composition 1 mark for AO1 (knowledge): Combining subroutines to form compound subroutines // a subroutine that calls other subroutines; A. another subroutine 1 mark for AO2 (analyse): Several subroutines are combined to form the compound subroutine Serving // FindFreeTill, ServeBuyer, UpdateStats, CalculateServingTime, IncrementTimeWaiting, UpdateTills, OutputTillAndQueueStates are combined into one subroutine Serving (Note: 2 or more subroutines must be named); Several subroutines are combined to form the compound subroutine QueueSimulator // ResetDataStrucutures, ChangeSettings, ReadInSimulationData, OutputHeading, BuyerArrives, Serving, TillsBusy, OutputTillAndQueueStates, OutputStats, UpdateTills are combined into one subroutine QueueSimulator (Note: 2 or more subroutines must be named); Max 1 Data composition 1 mark for AO1 (knowledge): Combining data objects to form compound data; 1 mark for AO2 (analyse): Several records of type Q_Node are combined to form the compound data structure BuyerQ // (three) values/data items are combined to make a Q_Node // BuyerID, WaitingTime and ItemsInBasket are combined to make a Q_Node // arrays; 2 11 MARK SCHEME – AS COMPUTER SCIENCE – 7516/1 – JUNE 2024 Qu Marks 11 2 2 marks for AO2 (analyse) Procedural composition Some groups of subroutines need to be called in two places/more than one place // the group of subroutines in Serving need to be called during the main simulation time and also after buyers stop arriving; Less code is required if only one compound subroutine needs to be called; It improves understanding of code; Data composition Array elements are easier to address than individual variables; The grouped data items/record can be manipulated as one unit; Max 2 Award marks for either procedural composition or data composition or both. 2 12 2 marks for AO2 (analyse) As index into (elements of) the Tills data structure // to specify which array element should be used; Don’t need to remember which element of the data structure is used when referring to it // code is easier to understand // the data structure can be changed / reordered and just by changing this value the program will still work; 2 13 1 2 marks for AO2 (analyse) All queue records (apart from the first one); are moved one location (forward); 2 13 2 Mark is for AO2 (analyse) Buyers moving forward in/towards the front of/up the queue; 1 14 1 Mark is for AO2 (analyse) Divides Stats[TOTAL_Q] by Stats[TOTAL_Q_OCCURENCE]; 1 12 MARK SCHEME – AS COMPUTER SCIENCE – 7516/1 – JUNE 2024 Qu Marks 14 2 2 marks for AO2 (analyse) Stats[TOTAL_Q] has the length of the queue added onto it (in each time unit that there is a non-empty queue); Stats[TOTAL_Q_OCCURRENCE] is incremented in each time unit that there is a (non-empty) queue; DPT within 14.2 reference to an index such as TOTAL_Q rather than the data to which it points, such as Stats[TOTAL_Q] 2 15 2 marks for AO3 (design) Need a 2D data structure/list of lists to store the queues // add a field to Q_Node to store which till the buyer is queuing for // add a queue/array/list to each Till/element of the Tills data structure; R. Use one array per Till

Show more Read less
Institution
2024_AQA: AS COMPUTER SCIENCE Paper 1
Module
2024_AQA: AS COMPUTER SCIENCE Paper 1

















Whoops! We can’t load your doc right now. Try again or contact support.

Written for

Institution
2024_AQA: AS COMPUTER SCIENCE Paper 1
Module
2024_AQA: AS COMPUTER SCIENCE Paper 1

Document information

Uploaded on
February 4, 2025
Number of pages
59
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

Content preview

2024_AQA: AS COMPUTER SCIENCE Paper 1
(Merged Question paper and marking scheme): Tuesday 14 May 2024


AS
COMPUTER SCIENCE
Paper 1


Tuesday 14 May 2024 Afternoon Time allowed: 1 hour 45 minutes
Materials
For this paper you must have:
 a computer
 a printer
 appropriate software
 the Electronic Answer Document
 an electronic version and a hard copy of the Skeleton Program
 an electronic version and a hard copy of the Preliminary Material
 an electronic version of the Data File SimulationData.txt
You must not use a calculator.

Instructions
 Type the information required on the front of your Electronic Answer Document.
 Before the start of the examination make sure your Centre Number, Candidate Name and
Candidate Number are shown clearly in the footer of every page (not the front cover) of your
Electronic Answer Document.
 Enter your answers into the Electronic Answer Document.
 Answer all questions.
 Save your work at regular intervals.

Information
 The marks for questions are shown in brackets.
 The maximum mark for this paper is 75.
 No extra time is allowed for printing and collating.
 The question paper is divided into three sections.

Advice
You are advised to allocate time to each section as follows:
Section A – 20 minutes; Section B – 25 minutes; Section C – 60 minutes.

At the end of the examination
Tie together all your printed Electronic Answer Document pages and hand them to the Invigilator.

Warning
It may not be possible to issue a result for this paper if your details are not on every page of your
Electronic Answer Document.

, AS Computer Science Paper 1 - Key Areas to Revise

Paper 1 of AS Computer Science focuses on the fundamentals of computer systems, programming, and
problem-solving. Key areas to revise include:

1. Fundamentals of Programming:

 Programming Concepts: Understand key programming concepts such as variables, constants, data types (e.g.,
integers, strings, booleans), and operators (e.g., arithmetic, logical, relational).
 Control Structures: Review conditional statements (if, if-else, switch) and looping constructs (for, while, do-
while). Understand how these are used to control program flow.
 Functions and Procedures: Be familiar with how to define and use functions and procedures, including
parameters and return values.
 Data Structures: Revise the use of arrays, lists, tuples, dictionaries, and other basic data structures. Be able to
implement and manipulate them in programs.
 Algorithms: Study common algorithms

2. Data Representation:

 Binary and Hexadecimal: Understand how data is represented in binary and hexadecimal formats. Be able to
convert between decimal, binary, and hexadecimal numbers.
 Character Encoding: Review character encoding schemes like ASCII and Unicode, and how characters are
represented in computers.
 Data Storage: Understand how data is stored in computers, including the concepts of bits, bytes, and file sizes.
Revise how data is organized in files (e.g., text files, image files) and the basic principles of compression.

3. Computer Systems:

 Hardware and Software: Review the key components of a computer system (e.g., CPU, memory, input/output
devices) and the distinction between hardware and software.
 The Fetch-Decode-Execute Cycle: Understand the process by which instructions are processed by the CPU,
including the roles of the ALU (Arithmetic Logic Unit), CU (Control Unit), and registers.
 Operating Systems: Understand the role of an operating system (e.g., managing resources, handling user inputs,
memory management, file systems).

4. Problem Solving:

 Problem-Solving Techniques: Be prepared to use algorithms and flowcharts to solve problems. Practice
breaking down problems into smaller tasks and developing algorithms to solve them efficiently.
 Pseudocode: Be comfortable writing pseudocode to represent algorithms, ensuring it is clear, logical, and easy to
understand.

5. Networks and Communication:

 Networking Fundamentals: OSI and TCP/IP Models & Wireless Communication:

6. Databases:

 Database Concepts: SQL:

7. Software Development Lifecycle:

 Development Process & Testing and Debugging.



IB/M/Jun24/G4001/E7 7516/1

, 2


Section A

You are advised to spend no more than 20 minutes on this section.

Enter your answers to Section A in your Electronic Answer Document. You must save this
document at regular intervals.

Question 04 in this section asks you to write program code starting from a new
program/project/file.

You are advised to save your program at regular intervals.


0 1 Figure 1

S1  "011101"
S2  "001100"
C  "0"
R  ""
FOR J = 0 TO 5
X  5 - J
D1  S1[X]
D2  S2[X]
IF C = "0" THEN
IF D1 = D2 THEN
S  "0"
C  D1
ELSE
S  "1"
ENDIF
ELSE
IF D1 = D2 THEN
S  "1"
C  D1
ELSE
S  "0"
ENDIF
ENDIF
R  CONCATENATE(S, R)
ENDFOR
OUTPUT R

The function CONCATENATE(X, Y) returns the string formed by concatenating the
string Y to the end of string X. For example, CONCATENATE("cat", "dog")
returns "catdog".

The strings are zero index based.




IB/M/Jun24/7516/1

, 3


Complete Table 1 by hand-tracing the algorithm in Figure 1.

You may not need to use all the rows in Table 1.

You do not need to indicate that C, D1, D2 and S are strings.

The first row of Table 1 has already been completed for you.


Table 1



S1 S2 C R J X D1 D2 S

"011101" "001100" "0" ""




OUTPUT:



Copy the contents of all the unshaded cells in Table 1 into your Electronic
Answer Document.
[5 marks]




Turn over ►
IB/M/Jun24/7516/1

, 4


0 2 A program uses both local and global variables.

0 2 . 1 State two differences between local and global variables.
[2 marks]

0 2 . 2 Give two reasons why it is good practice to use local variables.
[2 marks]


0 3 Programmers are encouraged to adopt a structured approach to writing programs.

Explain three reasons for adopting the structured approach.
[3 marks]


0 4 Figure 2 shows an algorithm represented using pseudo-code.

Figure 2

OUT_NOLF "Enter an integer: "
INPUT Number1
OUT_NOLF "Enter another integer: "
INPUT Number2
IF Number1 > Number2 THEN
Number  Number1 DIV Number2
ELSE
Number  Number2 DIV Number1
ENDIF
Count  0
WHILE Count ≠ Number
Count  Count + 1
IF (Count MOD 10) = 0 THEN
OUT_NOLF "X"
ELSE
IF (Count MOD 5) = 0 THEN
OUT_NOLF "V"
ELSE
OUT_NOLF "/"
ENDIF
ENDIF
ENDWHILE

The OUT_NOLF command displays the output without a line feed. The following series
of OUT_NOLF commands will display ABC:

OUT_NOLF "A"
OUT_NOLF "B"
OUT_NOLF "C"




IB/M/Jun24/7516/1

, 5


Table 2 lists the MOD and DIV operators for each of the available programming
languages. You should refer to the row for your programming language.


Table 2



Programming language MOD DIV

C# % /

Java % /

Pascal mod div

Python % //

VB.NET Mod \


What you need to do:

Task 1
Write a program to implement the algorithm in Figure 2.

Task 2
Test that your program works:
 run your program
 enter 4
 enter 99



Evidence that you need to provide
Include the following evidence in your Electronic Answer Document.
0 4
. 1 Your PROGRAM SOURCE CODE for Task 1.
[8 marks]
0 4
. 2 SCREEN CAPTURE(S) showing the test described in Task 2.
[1 mark]




Turn over ►
IB/M/Jun24/7516/1

, 6


Section B

You are advised to spend no more than 25 minutes on this section.

Enter your answers to Section B in your Electronic Answer Document. You must save this
document at regular intervals.

These questions refer to the Preliminary Material and the Skeleton Program, but do not require
any additional programming.

Refer either to the Preliminary Material issued with this question paper or your electronic copy.


0 5 . 1 State the most appropriate data type to use for numbers with a fractional part, for
example 12.79.
[1 mark]

0 5 . 2 State the identifier of a variable in the Skeleton Program that is used to hold a number
with a fractional part.
[1 mark]


0 6 . 1 State the most appropriate data type to use for values that may consist of more than
one character.
[1 mark]

0 6 . 2 State the identifier of a variable in the Skeleton Program that is used to hold more
than one character.
[1 mark]


0 7 State the name of an identifier for a subroutine defined in the Skeleton Program that
returns a single digit number.
[1 mark]


0 8 This question refers to the subroutine CalculateServingTime.

Explain the reason for adding the value 1 to the result of dividing NoOfItems by
TILL_SPEED.
[1 mark]


0 9 This question refers to the subroutine QueueSimulator.

Why might the subroutine Serving be called repeatedly after the specified time for
the simulation has finished?
[2 marks]




IB/M/Jun24/7516/1

, 7


1 0 The Skeleton Program uses a number of data structures.

1 0 . 1 State the identifier of a data structure that stores values of a user-defined data type.
[1 mark]

1 0 . 2 State the identifier of a data structure that stores values of only one built-in data type.
[1 mark]


1 1 . 1 Explain what is meant by composition and give an example where composition is used
in the Skeleton Program.
[2 marks]

1 1 . 2 Describe two reasons why composition is used in the Skeleton Program.
[2 marks]


1 2 What is the named constant TIME_SERVING used for and what is the benefit of using
a named constant in this way?
[2 marks]


1 3 This question refers to the subroutine ServeBuyer.

1 3 . 1 Describe the purpose of the statements within the FOR loop.
[2 marks]

1 3 . 2 What aspect of a shop do the FOR loop and the statements inside it simulate?
[1 mark]


1 4 One of the statistics calculated is average queue length.

This is calculated using the data structure Stats.

1 4 . 1 Describe how some of the values in Stats are used to calculate the average queue
length in the subroutine OutputStats.
[1 mark]

1 4 . 2 Describe how the relevant values in Stats are updated in the subroutine Serving to
enable the calculation in the subroutine OutputStats to produce the correct result.
[2 marks]


1 5 In the Skeleton Program buyers join a single queue and are then served at one of
several tills.

Outline the design changes needed for buyers to form a separate queue for each till.

You are not expected to actually make the changes.
[2 marks]



Turn over ►
IB/M/Jun24/7516/1

, 8


Section C

You are advised to spend no more than 60 minutes on this section.

Enter your answers to Section C in your Electronic Answer Document. You must save this
document at regular intervals.

These questions require you to load the Skeleton Program and
to make programming changes to it.


1 6 This question extends the functionality of the Skeleton Program.

When a buyer enters the shop and sees a long queue, they will change their mind and
leave the shop without buying anything. This is known as a shun.

The Skeleton Program is to be changed so that a buyer shunning the queue will
cause the shop to open another till, subject to the maximum number of tills available
not being exceeded.

The subroutine BuyerArrives needs to be modified so that a buyer arriving when
the queue length is 5 will not join the queue. A running total of the number of buyers
shunning the queue is to be kept.

After a buyer has shunned the queue, the shop will open another till, until the maximum
number of tills available have opened.

At the end of the simulation the number of buyers that have shunned the queue should
be output as part of the statistics.


What you need to do:

Task 1
Create a constant value to use as an index for a previously unused element of the data
structure Stats in which to store the count of the number of shuns.

Task 2
Amend the subroutine BuyerArrives so that a buyer only joins the queue when
fewer than 5 buyers are in the queue and shuns the queue if there are 5 buyers in
the queue.

If a buyer shuns the queue, the number of shuns and the number of tills operating
should be updated as appropriate and a suitable message showing the ID of the buyer
that has shunned the queue should be displayed.

Task 3
Amend the subroutine OutputStats to output the total number of shuns with an
appropriate message.




IB/M/Jun24/7516/1

, 9


Task 4
Test that the changes you have made work by conducting the following test:
 run your amended Skeleton Program
 enter Y
 enter 50
 enter 1



Evidence that you need to provide
Include the following evidence in your Electronic Answer Document.
1 6
. 1 Your PROGRAM SOURCE CODE:
 that sets the value of the new constant
 for the entire subroutine BuyerArrives
 for the entire subroutine OutputStats.
[7 marks]
1 6
. 2 SCREEN CAPTURE(S) showing the requested test described in Task 4.

The SCREEN CAPTURE(S) only need to show the simulation statistics that are
displayed when the simulation finishes.
[1 mark]




Turn over for the next question




Turn over ►
IB/M/Jun24/7516/1
£6.15
Get access to the full document:

100% satisfaction guarantee
Immediately available after payment
Both online and in PDF
No strings attached


Also available in package deal

Get to know the seller

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
Cate001 Chamberlain College Nursing
Follow You need to be logged in order to follow users or courses
Sold
1402
Member since
2 year
Number of followers
909
Documents
1561
Last sold
1 day ago
Ace Your Exams with Expertly Crafted Study Materials!

Looking to level up your revision? I offer comprehensive, easy-to-understand study materials tailored for major exam boards including AQA, OCR, Edexcel, and more, perfect for A-Level, GCSE, and other courses. ✨ What You’ll Get: 1. Concise summaries and clear explanations 2. * Past exam papers with complete official marking schemes * Whether you need quick revision notes, detailed study guides, or real past papers to test your knowledge, I’ve got you covered. These resources are designed to help you study smarter and achieve top grades.

Read more Read less
4.4

284 reviews

5
196
4
51
3
18
2
3
1
16

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their exams and reviewed by others who've used these revision notes.

Didn't get what you expected? Choose another document

No problem! You can straightaway pick a different document that better suits what you're after.

Pay as you like, start learning straight away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and smashed it. It really can be that simple.”

Alisha Student

Frequently asked questions