cs: paper 2 revision

Cards (48)

  • abstraction
    removal of unnecessary detail
  • decomposition
    breaks complex problem down into smaller problems
  • advantage of merge sort over bubble sort
    efficient for large datasets, list doesn't need to be ordered
  • why must a list need to be if binary sort is used
    it must be sorted alphabetically
  • binary search process
    midpoint of dataset is found. compare whether item is higher or lower than midpoint, get rid of unused sub-set, find midpoint of used sub-set, compare again and repeat.
  • variables purpose
    can change throughout the program
  • programming constructs
    selection, sequence, iteration
  • example and definition of a constant
    Pi, it's value stays the same
  • data types:
    string, real, Boolean, integer
  • SQL structure
    SELECT(info), FROM(table name), WHERE(condition is met)
  • symbol for selecting all fields in a table (SQL)
    *
  • calling an array using index

    [value on column down, value on row across]
  • input validation
    to ensure numerical data entered is sensible/meets expectations
  • range check
    to ensure value is within boundary and acceptable.
  • data validation
    process of checking data is obeying rules so its sensible and expected
  • authentication
    confirms identity of someone on a computer system, grants them access(username and password)
  • maintainability
    indentation, comments, sensible variable names, subroutines.
  • presence check
    ensure input data is entered, so the program can function normally
  • logic error

    program runs but does not give expected output
  • syntax error
    error in grammar which prevents program running.
  • which type of testing, tests programs regularly as its written?
    iterative testing.
  • which type of testing, tests a program at the end?
    terminal/final testing
  • what do comments do
    explain what each part of the program is doing
  • what does sensible variable name mean
    changing a variable name to something more meaningful that a single character
  • what are subroutines used for
    so code can be reused in another part of the program
  • logical operatiors
    AND, OR, NOT
  • AND rule

    both inputs MUST be true
  • OR rule
    either input can be true or false
  • NOT rule
    input must be false to give true output
  • high level language definition
    English-like keywords, translated into machine code to be executed(syntax)
  • why does a computer translate HLL code before its executed
    HLL can't be executed directly by the CPU, it must be translated by the processor into machine code first
  • compiler function
    all code translated in one go, saves as an executable file and runs anytime
  • interpreter function
    translates and executes the code one line at a time, no executable file so it must be retranslated each time its run.
  • why should a game be commercially compiled?
    compiling produces executable files, so users of the program can't view or modify the source code
  • why is low level language used for embedded system
    LLL can be directly processed by processor, embedded systems run quickly.
  • differences between high level and low level languages
    HLL: translated into machine code before run, runs on range of different computers. LLL: directly run by processor, only works with specific type of computer.
  • advantages of using an interpreter during the development phase
    identifies syntax errors as each line of program is translated and run, debugging is simple and precise.
  • feature of IDE: run time environment
    allows code to run within the IDE
  • features of IDE: error diagnostics

    helps programmer to identify and fix errors.
  • features of IDE: translator
    allows code to be translated into machine code to be executed by processor.