Implementaion

Any program uses a combination of sequence, selection and iteration.

Sequence:

This refers to the order in which the code is executed. Typically from top to bottom.

Selection:

Only certain lines of code are executed. For example a program like pass/fail would only show pass or fail, not both.

Iteration:

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

Procedural:

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.

Event-driven:

This is designed to handle events such as mouse clicks.

Declarative:

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.

Advertisements
This entry was posted in Uncategorized. Bookmark the permalink.

One Response to Implementaion

  1. This is an excellent post Ryan, well done. The only area you could have improved would have been your definition of declarative languages. They are made up of facts and rules – remember the exercise that we did in class last week using Prolog?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s