Any program uses a combination of sequence, selection and iteration.
This refers to the order in which the code is executed. Typically from top to bottom.
Only certain lines of code are executed. For example a program like pass/fail would only show pass or fail, not both.
A repletion of a statement or statements in a program. Iteration is used when the user has loops in their program.
Seven Characteristics of a completed program
Correct: the program meets the software specification.
Maintainable: makes changes easily and fixes them.
Reliable: the answer will always be consistent e.g. 5 x 2=10 the answer must always be 10.
Readable: a program being readable includes using meaningful variable names (relates to what it’s about), internal commentary (describing what you’re doing), and use of white space (use returns).
Portable: run on different operating systems e.g. Mac or PC.
Efficient: the program must be able to run without overusing system resources e.g. the processor.
Robust: the program won’t crash.
Types of Programming Languages
Programs follow a sequence of steps until they terminate. The code is made up of procedures and functions. A procedural program has a clear start and end point. C++ is an example of procedural programming language.
This is designed to handle events such as mouse clicks.
Programmers use this type of language to specify what the problem is and how to solve it by writing code.
High level Vs Low level languages
High level language is a language designed to be easily understood by programmers. It’s a mix between programming language and English language.
Low level language is in a form in which the computer is able to understand, this is known as machine code.
Complier and Interpreter
An interpreter decodes and executes one line at a time. Programmers tend to use this as it’s easier to correct mistakes.
A complier translates the whole code in one opeartion. This is much faster than an interpreter.