O GoConqr está de visual novo! Conte para nós o que você achou.

Mapa mental

2.2.1 OCR AS Level Programming Techniques

thomas gibbons Computer Science A level Inglês

2.2.1 OCR AS Level Programming Techniques

Conteúdo do mapa

2.2.1 OCR AS Level Programming Techniques

  1. Programming Costructs

    • Sequence
      • Code is executed line-by-line, from top to bottom
    • Itteration
      • Code is executed while a condition is being me or for a certain amout of repeats.
        • Count controlled
          • When the itteration is repeated a set amount of times
            • FOR loops
        • Condition controlled
          • Itteration continued until a condition is met or stops being met
            • WHILE loops
    • Selection
      • When a certain block of code is executed if a certain condition is met
        • IF statements
        • Can be called branching
  2. Global and Local Variales

    • Variables can be defined with either local or global scope
      • Where scope refers to the section of code in which the variable can be accessed
    • Local Variables
      • They have limited scope
        • Meaning they can only be accessed within the block of code in which they were defined
        • If it is defined within a subroutine it can only be accessed in that subroutine
          • Therefore, multiple local variables can exist with the same name without being affercted by or affecting each other
          • They are deleted once the subroutine has finished meaning they use less space
      • The use of local variables is considered good practice
        • Because it ensures subroutines are self-contained with no danger of variables being affected by code outside
    • Global Variables
      • Can be accessed across the whole program
        • Useful for values that need to be accessed throughout the whole program
      • Any variable declared in the main body of a program are automatically declared as global
      • Not recommended due to the risk of them being unintentionally overwritten and eddited
      • They use more space due to them not being deleted until the program terminated
  3. Modularity, Functions and Procedures

    • Modularity
      • Modular programming is a programming technique used to split large complex tasks into smaller self-contained modules
        • Is essensial to making a problem easier to understand and approach
          • A modular design also makes it easier to:
            • Divide tasks between a team
            • Manage the development process
            • Simplify the process of testing and maintenance
              • As each component can be dealt with individually
                • This improves the reusability of components
                  • As once a module had been tested it can be reused with confidence
      • A popular technique used to modularise programs is the top-down approach
        • This is where the problem is continually broken down into sub-routines
          • Until each can be represented as an individual, self-contained, blackbox which performs a certain task
            • These modules form blocks of code called subroutines
              • Which can be either of
                • Functions
                • Procedures
        • This can also be called stepwise refinement
    • Procedures vs Functions
      • Functions and procedures are both named blocks of code that perform a specific task
      • Procedures dont have to return a value
        • Whereas functions have to return a value
      • Procedures can return multiple values
        • Functions have to return 1 single value
      • Functions usually use local variables
        • But procedures are typically given data as parameters
          • Parameters
            • Values passed into a function
            • When parameters are passed into a subroutine they can be passed by referance or by value
              • By value
                • When a parameter is passed by value it is treated like a local variable
                  • A copy of the value is passed into the subroutine and discarded at the end
                    • Therefore its value outside the subroutine is unaffected
              • By refrance
                • When a parameter is passed by reference the subroutine is given the address of the parameter
                  • Therefore the value of the parameter will be updated at the given address
  4. Use of an IDE

    • An Integrated Development Environment or IDE
      • Is a program that provides a set of tools to make it easier for programmers to write, develop, and debug
    • Common features include
      • Stepping
        • This allows you to monitor the individual effect of a line of code
          • By executing a single line at a time
      • Variable watch
        • Lets a programmer observe how the contents of a variable change in real time
          • Sometimes used to pinpoint errors
      • Breakpoint
        • Allows users to set a point in the program where the program will stop
          • Could be condition based or at a specific line
      • Source Code Edditor
        • Aims to make the coding process easier by
          • Autocompleting words
          • Indenting
          • Highlighting syntax
          • Auto completing brackets
      • Debugging Tools
        • Some IDEs will provide systems to check for errors
          • With a guide as to where they likely occurred through line numbers and highlighting

Imagens e arquivos do mapa

  • 2.2.1 OCR AS Level Programming Techniques
  • 2.2.1 OCR AS Level Programming Techniques

Informações

Descrição
A level Computer Science (2.2) Mapa Mental sobre 2.2.1 OCR AS Level Programming Techniques, criado por thomas gibbons em 09-01-2023.
Criado por
thomas gibbons
Visualizações
0
Avaliação

Fale Conosco

Sobre o que é sua mensagem?

O que você acha do novo visual?

Você gostou?