Curriculum Portal

Select a course.

arrow_back

Retrieval: 2.2 Problem solving and programming

infoWhy this? Problem solving and programming are the practical tools that enable computer scientists to transform ideas into working solutions. By learning how to analyse problems, design algorithms and implement them in code, students develop the ability to create software that meets user needs and solves real-world challenges. This unit builds on computational thinking by introducing the techniques required to develop, test and refine programs, while also fostering persistence, logical reasoning and creativity. These skills are highly valued across a wide range of industries, from software engineering and cybersecurity to finance and scientific research.

scheduleWhy now? Having developed an understanding of computational thinking, students are now ready to apply these principles through programming. This unit provides the knowledge and practical skills needed to construct increasingly sophisticated solutions using programming concepts, algorithms and data structures. Studying problem solving and programming at this stage prepares students for more advanced topics within the course and lays the groundwork for success in the Non-Exam Assessment (NEA), where independent analysis, design and implementation are essential. Developing these skills now also helps students become more confident and efficient programmers, capable of tackling unfamiliar and complex problems.

neurologyYou need to know

  • Sequence executes instructions in a specified order, iteration repeats instructions, and branching selects which instructions execute according to a condition.
  • Count-controlled iteration repeats a block a fixed number of times, while condition-controlled iteration continues while or until a Boolean condition is met.
  • Recursion occurs when a subroutine calls itself, and every correct recursive solution requires a base case that stops further calls and a recursive case that moves towards the base case.
  • Recursive solutions use the call stack to store each active call, so deep or uncontrolled recursion can consume substantial memory or cause a stack overflow.
  • Iteration usually uses less memory than recursion, but recursion can express problems with recursive structures or repeated subproblems more clearly.
  • A global variable can be accessed from multiple parts of a program, whereas a local variable is accessible only within the subroutine or block in which it is declared.
  • Modularity divides a program into self-contained subroutines or classes, making code easier to develop, test, reuse and maintain.
  • A function returns a value to its caller, whereas a procedure performs a task and does not have to return a value.
  • Parameters provide data to a subroutine; passing by value supplies a copy that leaves the original argument unchanged, while passing by reference allows the subroutine to alter the original data.
  • An integrated development environment commonly provides a source-code editor, translator, automatic formatting, syntax diagnostics, breakpoints, stepping and inspection of variable values.
  • A class is a template defining attributes and methods, while an object is an instance of a class with its own state.
  • Encapsulation groups data with the methods that operate on it and restricts direct access to internal state; inheritance allows a subclass to acquire and extend features of a superclass, and polymorphism allows the same method interface to produce behaviour appropriate to different object types.
  • A problem is suitable for computational methods when its inputs, required outputs and rules can be represented precisely and a finite, unambiguous process can produce an acceptable solution.
  • Problem recognition identifies whether a new problem is the same as, or similar to, a known class of problem for which an existing method can be adapted.
  • Problem decomposition breaks a complex problem into smaller, manageable subproblems with clearly defined responsibilities and interfaces.
  • Divide and conquer recursively divides a problem into smaller instances, solves them independently and combines their results.
  • Abstraction manages complexity by removing irrelevant detail and retaining only the information and behaviour needed for the current problem.
  • Backtracking builds a candidate solution incrementally and abandons a path when it cannot lead to a valid solution; heuristics use experience-based rules to find a satisfactory solution quickly without guaranteeing the best solution.
  • Data mining discovers useful patterns, relationships or anomalies in large datasets, while visualisation represents data or processes graphically to make patterns and results easier to interpret.
  • Performance modelling predicts or measures how a system behaves under different workloads, and pipelining overlaps stages of processing so that several tasks are at different stages at the same time, increasing throughput.

rocket_launchYou must be able to

  • Construct algorithms and programs that combine sequence, branching and count-controlled or condition-controlled iteration appropriately.
  • Design recursive solutions with a valid base case and a recursive case that reduces the problem towards termination.
  • Compare recursive and iterative solutions by tracing their execution and evaluating clarity, execution time, memory use and risk of non-termination or stack overflow.
  • Decompose a program into cohesive functions, procedures or classes, using local variables and clear parameters to minimise unnecessary global state.
  • Pass parameters by value or by reference appropriately, predicting whether changes made inside a subroutine will affect the original argument.
  • Use an IDE to write, translate and debug programs by interpreting diagnostics, setting breakpoints, stepping through execution and inspecting variable values.
  • Create and use classes and objects with suitable attributes, methods and access controls, applying inheritance or polymorphism where these reduce duplication or support interchangeable behaviour.
  • Recognise and formulate computational problems by defining their inputs, outputs, constraints and finite processing rules, then apply decomposition, abstraction or divide and conquer.
  • Apply backtracking or heuristic methods to a problem, explaining how candidate solutions are explored, rejected or prioritised and whether an optimal result is guaranteed.
  • Apply data mining, performance modelling, pipelining or visualisation to suitable problems and evaluate how the chosen method improves pattern discovery, prediction, throughput or interpretation.


Revision Quiz

trophy Congratulations! You have completed the quiz.