3.2.5 - Writing Maintainable Programs

Descrição

A Level Computing (F452) Mapa Mental sobre 3.2.5 - Writing Maintainable Programs, criado por AndrewZV em 02-04-2014.
AndrewZV
Mapa Mental por AndrewZV, atualizado more than 1 year ago
AndrewZV
Criado por AndrewZV mais de 10 anos atrás
51
2

Resumo de Recurso

3.2.5 - Writing Maintainable Programs
  1. Key Terms
    1. Variable
      1. Name associated with a particular memory location used to store data.
        1. By using the variable name, the programmer can:
          1. Store data
            1. Retrieve data
              1. Manipulate data
              2. The value of the data is not know when the program is written.
                1. Scope
                  1. Local variable
                    1. Declared and used inside:
                      1. Modules
                        1. Functions
                          1. Procedures
                            1. Subroutines
                            2. Only available inside their specified module, procedure etc...
                              1. Created when the subroutine is called.
                                1. Destroyed when the subroutine exits.
                                2. Global variable
                                  1. Declared at the beginning of the code.
                                    1. Available throughout the code.
                                  2. Can change while the program is running.
                                  3. Constant
                                    1. A data item with a fixed value.
                                      1. Assigned to a variable that cannot be changed when the program is executed.
                                      2. Identifier
                                        1. A name representing an object within a program.
                                          1. Variables
                                            1. Functions
                                              1. Procedures
                                                1. Data Types
                                                2. Given meaningful names.
                                                3. Reserved Word / Keyword
                                                  1. Vocabulary of a programming language.
                                                    1. Variables or other identifiers cannot use keywords.
                                                      1. Can only have the meaning which is defined in the language.
                                                    2. Coding Practices
                                                      1. Modularisation
                                                        1. Series of small routines.
                                                          1. Can quickly be seen to be performing one function.
                                                            1. Complex operations should be broken up into subroutines.
                                                              1. Defined separately and called from the main program.
                                                              2. Easier way to achieve if the program has been designed using top-down techniques.
                                                              3. Commenting Code
                                                                1. Comments are read by the programmer and ignored by the computer.
                                                                  1. Should be written while the code is written and not after.
                                                                    1. Comments should be used for:
                                                                      1. Program headers
                                                                        1. Subroutines
                                                                          1. Declaring variables
                                                                            1. Inline comments
                                                                          2. Indentation
                                                                            1. Improves readability.

                                                                          Semelhante

                                                                          A level Computing Quiz
                                                                          Zacchaeus Snape
                                                                          Types and Components of Computer Systems
                                                                          Jess Peason
                                                                          Input Devices
                                                                          Jess Peason
                                                                          Output Devices
                                                                          Jess Peason
                                                                          Computing
                                                                          Kwame Oteng-Adusei
                                                                          Pack of playing cards answer
                                                                          Karl Taylor
                                                                          Code Challenge Flow Chart
                                                                          Charlotte Hilton
                                                                          3.2.6 - Testing and Running a Solution
                                                                          AndrewZV
                                                                          Computing Hardware - CPU and Memory
                                                                          ollietablet123
                                                                          Computer Systems
                                                                          lisawinkler10
                                                                          Computer science quiz
                                                                          Ryan Barton