A-level Computing/AQA/Problem Solving, Programming, Data Representation and Practical Exercise/Fundamentals of Programming

From Wikibooks, open books for an open world
Jump to: navigation, search
Fundamentals of programming

Features of Imperative High Level Languages

Illustrate these features for a particular imperative, third-generation language such as Pascal.
Data Types

Use the following appropriately.

  • Built-in
Integer, byte, real, boolean, character, string, date/time.
  • User-defined
Enumerated, subrange, sets, records, arrays
Programming statements
  • Type Definitions
  • Variable Declarations
  • Constant Definitions
    • Explain the advantages of named variables and constants.
  • Assignment
  • Iteration
  • Selection
  • Procedure/Function Declarations
  • Procedure and Function calling - Explain the advantages of procedure/functions.
  • Procedure and Function Parameters
    • Describe the use of parameters to pass data within programs.
    • Understand the different mechanisms for parameter passing: by value and by reference

Arithmetic operators including modulo arithmetic +, –, /, x, DIV, MOD

Relational operators =, <, >, <>, <=, >=

Boolean operators NOT, AND, OR

Logical bitwise operators NOT, AND, OR, XOR

Set operators Union, difference, intersection, membership

Built-in functions

  • Arithmetic functions: round, truncation.
  • String handling functions: length, position, substring, concatenation.
  • String conversion functions to/from integer, real, date/time.


The Role of Variables

Recognise the different roles a variable can take:

fixed value, stepper, most recent holder, most wanted holder, gatherer, transformation, follower, temporary.
Fundamentals of Structured Programming

Understand the structured approach to program design and construction.

  • Construct and use structure tables, structure charts and hierarchy charts when designing programs.
  • Use meaningful identifier names.
  • Use procedures/functions with interfaces.
  • Use procedures that execute a single task.
  • Explain the advantages of the structured approach.
Data Structures

Arrays

One- and Two-Dimensional Arrays - Use arrays in the design of solutions to simple problems.
Fields, Records and Files
Read/write from/to a text file (including csv file)
Read/write records from/to a file of records
Validation
  • Understand the importance of validation of input data.
  • Program simple validation

Variables[edit]

questions