writing maintainable programs ocr computing AS

Description

Use these flash cards if you want an mlg knowledge of writing maintainable programs to the OCR spec , FOOS
Ron Wabe
Flashcards by Ron Wabe, updated more than 1 year ago
Ron Wabe
Created by Ron Wabe about 9 years ago
18
0

Resource summary

Question Answer
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
Show full summary Hide full summary

Similar

Computing Hardware - CPU and Memory
ollietablet123
GCSE Biology B2 (OCR)
Usman Rauf
Unit 1 flashcards
C R
Biology B1.1 - Genes
raffia.khalid99
C1 Quiz
Leah Firmstone
OCR Physics P4 Revision
Dan Allibone
Cell Structure
megan.radcliffe16
Exchange surfaces and breathing
megan.radcliffe16
AS Chemistry - Enthalpy Changes
Sarah H-V
Biology B1.3
raffia.khalid99
A2 Organic Chemistry - Reactions
yannycollins