1/19
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai |
|---|
No analytics yet
Send a link to your students to track their progress
Program
set of instructions telling computer what to do to solve particular problem
Programming paradigms
approaches to programming e.g procedural or object orientated
Procedural programming
programmer sets out step by step instructions in source code
sequential
top down design
solutions to sub problems are written as methods
program is made up of number of methods called repeatedly
Sequential
instructions carried out one after another
Top-down design
breaking complex problems into smaller sub problems
Examples of procedural programming
COBOL or FORTRAN
Object orientated programming
programmer creates objects which contain properties and methods
classes
inheritance
encapsulation
Classes
acts as template defining properties and methods for group of objects
Inheritance
allows a class to build off another so only differences need to be coded
Encapsulation
hides the data of an object so can only be accessed through methods within object
Examples of object orientated programming
C# or C++
Advantages of object orientated programming
code can be programmed and maintained independently
code for object can be reused in different programs
details of implementation are hidden so direct access to object data is reduced
Software development environment (SDE)
software with integrated set of programming tools to build and application
Tools provided by SDE’s
clipboard, used to copy/paste
collapsible code sections for easier reading
line numbering to reference location e.g errors
code completion tools showing list of available functions
provide facility to translate program to language specific method of running a program
Machine code
instructions in binary format that can be directly executed by computer
Source code/ high level code
original program code written by programmer, needs translated to execute
High level code translation
program must be translated into binary so the computer can understand and execute the instructions
High level code translation process
library code is included if used (pre processing)
lexical analysis converts source code into tokens
syntax analysis checks grammar rules are followed, must be correct to execute
semantic analysis ensures variables used have been declared and data types match
compiler performs multiple passes on code to optimise
machine code is generated and can be executed
Executing code
instructions loaded into memory and performed
Difference between compiler and interpreter
compiler translates whole program before its ran, faster e.g C++
interpreter translates program line by line, slower e.g Python