Computer Programming Methodology

Variable, Control Structure and Calculation


  • Variable- a unit of storage that can be modified during programme execution, usually by assignment or read operations. A variable is generally denoted by an identifier or by name.
  • The name denotes a modifiable unit of storage.
  • Attributes of the variable:
    • The address in memory where the data is stored
    • The actual data stored which can change during the execution of the program
    • The name of the variable or identifier
    • Assignment statement: a fundamental statement of all programming languages (except declarative languages) that assigns a new value to a variable
  • Variable types :- Integer, Real, String, Character, Boolean, Date.
  • Identifier- a string of characters used to identify (or name) some element of a programme. The kind of elements that can be named depends on the programming language; it may be a variable, a data structure, a procedure, a statement, a higher-level unit, or the programme itself.
  • Name-a notation for indicating an entity in a programme or system.
  • Reserved word-a word that has a specific role in the context in which it occurs, and therefore cannot be used for other purposes.
  • Keyword-a symbol in a programming language that has a special meaning for the compiler or interpreter.
  • Compiler-a programme that translates high-level language into absolute code, or sometimes into assembly language
  • Interpreter-a language processor that analyses a line of code and then carries out the specified action, rather than producing a machine-code translation to be executed later.
  • Pseudocode- a form of representation used to provide an outline description of the specification for a software module.

Order of Precedence

  • The order in which a calculation is evaluated is very important since the end result can differ according to which operation is given precedence, i.e. performed before another.
  • Using the mathematical operations to construct programmes that calculate numerical values, e.g. ( ) brackets, / - division, * - multiplication, - - minus, + - plus

Use BODMAS formulation.

Range and types of complex programs:

  • A suit of programmes in a production control system in a large manufacturing company.
  • A simple database programme, which records the movement of stocks in a small video hire shop.
  • A programme to perform statistical analysis on experimental results.
  • A programme to display the contents of a database over the web and process orders and payments.
  • An interactive multimedia programme, which might be informational, e.g. encyclopaedia.

Need to know before writing a program,

  • What the user requires from the system (output)
  • What processes will be required to produce this output (process)
  • What data needs to be processed to create the output (input)

Software Lifecycle

Requirement analysis - an accurate and complete set of clients and user requirements is produced to determine the characteristics of an acceptable solution.

  • Design - describes how the solution will be built to satisfy the requirements specified at the previous stage.
  • Coding - produce the programmes that will make up the system based on the design.
  • Testing - when the programme is initially completed, all the separate modules are being tested. Then a full test of the programme according to the test plan will be conducted. Errors will be corrected and the test is repeated.
  • Implementation -Once the stages are completed, implementation of the system commences. User documentation or operating instructions may be required. After the installation of the system, it must be kept operational and maintained according to the needs of the users.

Importance of system Development

  • Documentation of each phrase is crucial regardless of the type of model chosen or devised for any application
  • Let other parties know how the progress of design and analysis works
  • Done in parallel with the development process



Copyright © 2008 - Lecture Theory - is proudly powered by Blogger
Smashing Magazine - Design Disease - Blog and Web - Dilectio Blogger Template