Subjects

Subjects

More

View

OCR A Level Computer Science 2.2 Notes: PDF, GCSE, Past Papers, Guide

OCR A Level Computer Science 2.2 Notes: PDF, GCSE, Past Papers, Guide

 

Computer Science

 

12/13

Revision note

OCR A Level Computer Science covers key programming concepts and computational methods. This summary provides an overview of important topics like iteration, recursion, variables, subroutines, and object-oriented programming from the OCR A Level Computer Science specification.

19/01/2023

395

Computational Methods

This final section briefly touches on computational methods in OCR A Level Computer Science.

The document states that to solve a problem using computational methods, it must be:

  1. Clearly defined
  2. Computable
  3. Solvable

Highlight: Understanding computational methods is crucial for problem-solving in OCR A Level Computer Science.

This concludes the summary of key concepts covered in the OCR A Level Computer Science 2.2 revision notes PDF.

Component 2.2 revision notes
2
? Programming constructs
• sequence - when a set of program instructions are written one after another and
co

Register

Sign up to get unlimited access to thousands of study materials. It's free!

Access to all documents

Join milions of students

Improve your grades

By signing up you accept Terms of Service and Privacy Policy

Programming Constructs and Recursion

This section covers fundamental programming constructs and introduces recursion in OCR A Level Computer Science.

Sequence, Iteration, and Selection

The document outlines three key programming constructs:

  1. Sequence - Instructions executed in order
  2. Iteration - Repeating instructions based on conditions or counts
  3. Selection - Executing code based on true/false conditions

Vocabulary: Condition-controlled iteration repeats instructions based on a true/false condition.

Example: While loops are an example of condition controlled iteration in OCR A Level Computer Science.

Types of Loops

The text describes several types of loops:

  • For loops (count-controlled)
  • While loops (condition-controlled)
  • Do-while loops
  • Repeat-until loops
  • Nested loops

Recursion

Recursion is introduced as a subroutine calling itself. Key points include:

  • Uses a stack
  • Requires a base case and general case
  • Parameters passed by value

Example: A recursive function to sum numbers from 1 to n is provided as an example for OCR computer science.

The document compares pros and cons of recursion:

Pros:

  • Fewer lines of code
  • Natural for recursive data structures

Cons:

  • Harder to trace
  • Uses more memory
  • Slower due to stack operations
Component 2.2 revision notes
2
? Programming constructs
• sequence - when a set of program instructions are written one after another and
co

Register

Sign up to get unlimited access to thousands of study materials. It's free!

Access to all documents

Join milions of students

Improve your grades

By signing up you accept Terms of Service and Privacy Policy

Variables and Subroutines

This section covers local and global variables, as well as subroutines, functions, and procedures in OCR A Level Computer Science.

Global and Local Variables

The document contrasts local and global variables:

Local variables:

  • Accessible only within specific program parts
  • Can have same identifier in different subroutines
  • Memory released after subroutine finishes

Global variables:

  • Accessible anywhere in the program
  • Preserved in memory until program ends
  • Can make debugging more difficult

Definition: A global variable in computer science is accessible anywhere in a program for its entire execution.

Subroutines, Functions, and Procedures

The text defines and explains:

  • Subroutines: Named code sections callable by name
  • Procedures: Sets of instructions executed when called
  • Functions: Like procedures, but return a value

Benefits of subroutines include improved readability, reusability, and easier testing.

Highlight: Understanding the difference between global and local variables is crucial for effective programming in OCR A Level Computer Science.

Parameters and Arguments

The document explains:

  • Parameters: Data passed to subroutines
  • Arguments: Actual data pieces passed
  • Passing by value vs. passing by reference
Component 2.2 revision notes
2
? Programming constructs
• sequence - when a set of program instructions are written one after another and
co

Register

Sign up to get unlimited access to thousands of study materials. It's free!

Access to all documents

Join milions of students

Improve your grades

By signing up you accept Terms of Service and Privacy Policy

Integrated Development Environments and Object-Oriented Programming

This section covers IDEs and introduces object-oriented programming concepts for OCR A Level Computer Science.

Integrated Development Environment (IDE)

The document lists key features of IDEs:

  • Text editors
  • Autocomplete
  • Automatic formatting
  • Keyword highlighting
  • Automatic line numbering
  • Syntax checking
  • Runtime environment
  • Debugging tools

Vocabulary: An IDE (Integrated Development Environment) is a software suite that consolidates basic tools for software development.

Object-Oriented Programming (OOP)

The text introduces OOP concepts:

  • Objects: Real-world things in everyday life
  • Attributes: Data items describing objects
  • Methods: Operations a class can execute
  • Class: Blueprint defining properties of objects
  • Instantiation: Creating an object from a class definition

Definition: Encapsulation in OOP binds attributes and methods, protecting data.

The document also mentions:

  • Getter and setter methods
  • Inheritance
  • Polymorphism
Component 2.2 revision notes
2
? Programming constructs
• sequence - when a set of program instructions are written one after another and
co

Register

Sign up to get unlimited access to thousands of study materials. It's free!

Access to all documents

Join milions of students

Improve your grades

By signing up you accept Terms of Service and Privacy Policy

Component 2.2 revision notes
2
? Programming constructs
• sequence - when a set of program instructions are written one after another and
co

Register

Sign up to get unlimited access to thousands of study materials. It's free!

Access to all documents

Join milions of students

Improve your grades

By signing up you accept Terms of Service and Privacy Policy

Component 2.2 revision notes
2
? Programming constructs
• sequence - when a set of program instructions are written one after another and
co

Register

Sign up to get unlimited access to thousands of study materials. It's free!

Access to all documents

Join milions of students

Improve your grades

By signing up you accept Terms of Service and Privacy Policy