1. A games company is developing a flight simulation program. State three pieces of information that would need to be researched in order to design this simulator. (3 marks)
2. Explain what is meant by "concurrent processing" and describe one example of how the simulator could make use of it. (2 marks)
3. The following tube map of London is an abstraction made up of component parts. Using this example, explain the term abstraction (2 marks)
4. A simulation games company is re-creating the London tube for a game. Program development requires the use of re-usable components. State three examples of how reusable components are used in the above example (3 marks)
5. Another term for the use of re-usable components is modular programming. Why is this necessary for large programs? (3 marks)
6. State two advantages to using re-usable parts while developing programs (2 marks)
7. Explain why good programming practice generally avoids the use of global variables.(2 marks)
8. The following algorithm shows the outworking of a binary search. Fill in the blanks on line 5.
9. Part of the data held by the programmers for the search is shown below. State two reasons that suggest it would be best NOT to use a binary search on this data. (2 marks)
10. Fill in the blanks on line 1 for the linear search that could be carried out on the data set above (to find the value 27 in the list)
11. The following diagram shows the steps needed for a _______ on these values: (42, 83, 27, 18, 52).
12. When comparing linear and binary search it is possible to look at the best, worst and average number of items in the array that need to be checked to find the item being searched for. The assumption here is that:
13. As the size of an array increases the average number of checks grows logarithmically. State what is meant by logarithmic growth.
14. A binary search tree is one example of a type of tree. State the main features of a tree. (3 marks)
15. The following function is recursive. State the line in which recursion is occuring.
16. State two things that are occuring on line 01 of the algorithm above (2 marks)
17. State three advantages of recursion (3 marks)
18. State four drawbacks of recursion (4 marks)
19. The following code re-writes the code above (recursive function) in an iterative manner. Which of the following would correctly fit in with this algorithm on line 02?
20. Lisa wants to create an app and does some market research first. State four items of data that she could obtain in order to make a sensible choice of an app development project. (4 marks)
21. A cafe manager is reorganising the layout of the cafeteria in order to speed up the service to customers. Explain how computational methods could be used in order to improve the layout of this cafeteria. (3 marks)
22. Describe what is meant by a heuristic approach to problem-solving? (2 marks)
23. In which of the following are heuristic methods likely to be used?
24. Connect 4 is a popular game in which players must place four 'coins' in a row to win. Explain how a programmer could make use of a tree structure, using a heuristic approach in the development of the computer player for Connect 4? (4 marks)
25. Virus checkers work by looking for _________________________. They also use ___________ approaches.
26. The following answer explains how _________________ principles can be used to ensure that a house is built as quickly as possible.
27. How is the above used in any computer system? (3 marks)
28. Read the context below and fill in the blanks for the following algorithm.
29. In reference to the table below, assume every item in the array is equally likely to be searched for. Fill in the blanks for A.
30. Refer to the table above. Fill in the blanks for B.
31. Refer to the table above. Fill in the blanks for C.
32. Refer to the table above. Fill in the blanks for D.
33. State the purpose of Big O notation.(2 marks)
34. Explain the difference between a depth-first (post-order) and breadth-first traversal. (3 marks)
35. Read the context below and describe why a queue is a suitable structure for this program. (3 marks)
A program stores a queue of mathematical questions to be asked to a user.
The questions are asked in the order they are added.
Once a question has been asked it cannot be asked again.
New questions are continually added to the end of the queue.
The program will use a non-circular queue, questions, (implemented using an array)
to store the questions.
The pointer, head, stores the index of the first element in the queue.
The pointer, tail, stores the index of the last element in the queue.