writing maintainable programs ocr computing AS

Descripción

Use these flash cards if you want an mlg knowledge of writing maintainable programs to the OCR spec , FOOS
Ron Wabe
Fichas por Ron Wabe, actualizado hace más de 1 año
Ron Wabe
Creado por Ron Wabe hace más de 9 años
20
0

Resumen del Recurso

Pregunta Respuesta
What is a constant ( Definition ) A name that represents a fixed value, This must be set and defined at the start of the code and does not change throughout
What is a variable ( Definition ) A name that is identified and relates to a specific memory location that is used to store data. The value of the data is able to be changed while the program is running
What is a global variable Its a variable declared at the begging of the code and can be used throughout. It can be used in all subroutines in the program
what is a local variable can only be used the subroutine that it is declared in
what is an identifier ( definition ) The name that is given to a variable , constant or subroutine is an identifier
what is reserved keywork words that have specific use in the code with one purpose in the program. these cannot be used as identifiers
Differences between constants and variables there are two main differences, One , When a constant is declared it must be given an actual value. Variables can be left empty. Two , A constant must remain the same throughout the code. A variable can change
Initializing variables ( meaning ) Initializing means a variable is giving a value at the starting value, This makes the code easier to follow
How do constants maintain the program Using clear and descriptive identifiers makes the code easy to follow. Easier to remember and find when searching though code. It can however be changed
when naming constants and variables what should you do The name should identify and describe the item they should be commented to ensure identifying them and understanding them and their process is easy underscores
lay out of code Organize code into modulus use indentation ( both show the individual areas and processes in code and identify areas that need to be described ) comments ( to explain )
Did you like the flash cards
Mostrar resumen completo Ocultar resumen completo

Similar

Computing Hardware - CPU and Memory
ollietablet123
Unit 1 flashcards
C R
Cell Structure
megan.radcliffe16
Exchange surfaces and breathing
megan.radcliffe16
Biology B1.1 - Genes
raffia.khalid99
GCSE Biology B2 (OCR)
Usman Rauf
Biology B1.3
raffia.khalid99
A2 Organic Chemistry - Reactions
yannycollins
AS Chemistry - Enthalpy Changes
Sarah H-V
C1 Quiz
Leah Firmstone
OCR GCSE History-Paper Two: The Liberal Reforms 1906-14 Poverty to Welfare State NEW FOR 2015!!!
I Turner