Please enable JavaScript.
Coggle requires JavaScript to display documents.
Paper 2 - 9 mark Qs - Coggle Diagram
Paper 2 - 9 mark Qs
Discuss the benefits of Anna using an IDE to write and test her program rather than using a text editor.
-
-
-
-
-
-
-
-
Autocorrect, autocomplete, pretty printing (syntax hilighting, auto indentation), breakpoints, stepping, variable watch
Briefly outline how the bubble sort algorithm works. Discuss the relationship between the complexities and the two sorting algorithms and justify which of the two algorithms is best suited to sorting the array.
-
-
If at end of list the flag has been set the flag is unset and it starts at the beginning again. Initially set to True, on entry of loop unset to False, if a swap is made, set to True. When the flag is still false at end of list, no swaps have been made and therefore it is sorted
On2 - polynomial, n increases time increases by n2, if n doubles the time taken is squared (quadruples) - increases in a quadratic manner
-
Bubble can be tweaked, checking 1 less item per iteration, nth item will always be in the right place (bubbles up to top of list)
-
-
-
Discuss the need for, and benefits of, the students producing and using reusable program components in the development of the game.
-
E.g. function for character movement, same through different levels, don't need to rewrite the movement code in each level
Can import sub procedures e.g. graphics to save writing these, more likely to be error free as tested
-
Can update in one place, changed throughout
-
-
Compare the use of global and local variables and data structures in this program. Include the use of parameters and program efficiency in your answer.
Local variables
-
-
-
-
Mem efficient, space can be reused once function exited
Global variables
-
-
-
-
Easier programming, simpler to follow
If its a small program and unlikely the functions will be reused, don't need to worry about functions/local variables
If lists declared in the main, could be passed as params by ref or by val
Discuss the benefits of using different object-oriented techniques that Barney could use to achieve this.
-