¡GoConqr estrena diseño! Cuéntanos qué te parece.

Fichas

5. Writing maintainable programs

deepi1k73 Flash cards A levels Inglés 12 fichas

Fichas del conjunto (12)

  1. 1What is a variable?It is a value that can be changed while the program is running
  2. 2What is a constant?A value that cannot be changed while the program is running
  3. 3What is an identifier?The name given to a variable, constant, controller... (e.g. score)- can't be reserved words
  4. 4What are reserved words?words specific to the program to tell it what to do- e.g. IF, FOR, WHILE, CHAR
  5. 5What is the need for good programing writing techniques?1) comments- explanations of what the line does- makes the program more understandable
    2) indentations- spacing- looks neater, standard techniques, everyone gets it
    3) good identifiers- meaningful names- less errors- less confusion
    4) subroutines- parts of program- easier to make program- less cluter
  6. 6How to declare a variable?1) Name, 2) Data type, 3) Scope- Local declared within a subroutine or global declared at start can be used throughout program
  7. 7Why should a variable be declared?So translator can reserve memory space for it and doesn't think it is a reserved word (variable can't have the same name as a reserved word)
  8. 8How to write a meaningful identifieruse short descriptive names, no space ( use _), no reserved words, conventions: sentence case, camelcase (capitalise starting length), including type of variable, hungarian notation (txtScore)
  9. 9How do consonants help to improve maintainability?It can be understood by everyone rather than using actual value so anyone can maintain program (gravity is understood better than 9.81)
  10. 10How to initialise a variableThey need to have a starting value so that it is reset each time the program starts- Numeric- 0, String- “”, Boolean- False
  11. 11Why and how to annotate codescomments used so program can be understood in the future or by someone else so that it can be maintained. Header comment- used at the start name, what program does, programmer name, date, notes on errors or current work. Subroutines- what it does, parameters. Purpose of variables and constants. Each line of code explained.
  12. 12Why indent and format code structure?Indenting- at the end of each code structure- shows where each code starts and finishes.
    Formatting- codes should be grouped in logical blocks, add a blank line underneath.
    Makes it easy to maintain and understand.

Información

Descripción
A levels Flash cards Fichas sobre 5. Writing maintainable programs, creado por deepi1k73 el 24/05/2014.
Creado por
deepi1k73
Visitas
27
Valoración

Escríbenos

¿Sobre qué es tu mensaje?

¿Qué te parece el nuevo diseño?

¿Te gusta?