Presentation is loading. Please wait.

Presentation is loading. Please wait.

Programming Introduction. What is a program? Computers cannot think for themselves, they can only follow instructions. A program is a set of instructions.

Similar presentations


Presentation on theme: "Programming Introduction. What is a program? Computers cannot think for themselves, they can only follow instructions. A program is a set of instructions."— Presentation transcript:

1 Programming Introduction

2 What is a program? Computers cannot think for themselves, they can only follow instructions. A program is a set of instructions that tell the computer what to do.

3 How do we program? Programs are written in specially developed languages called programming languages. There are many different types of programming languages. There are different levels of programming languages.

4 Low Level Languages Low Level languages are: languages which computers understand. difficult for people to understand. For example Machine code uses only binary numbers (0s and 1s) which the processor can use.

5 High Level Languages High Level Languages: use everyday words which people recognize. can be easily understood by people. For example - LOGO (used in S2) uses words such as forward, backward, left, right, repeat, clear etc.

6 Visual Basic The High Level Language we will be programming with is called Visual Basic. Visual Basic is easy to learn as it uses every day words and each program is laid out in logical sections.

7 Stages Stages: 1.Problem DescriptionProblem Description 2.Problem SpecificationProblem Specification 3.AlgorithmAlgorithm 4.RefinementRefinement There are many stages involved in writing a program. A lot of thought must go into each program before we enter it into the computer. 5.ProgrammingProgramming 6.TestingTesting 7.EvaluationEvaluation

8 1. Problem Description Programs are written to solve problems. To write a program we first have to identify a problem that needs solved. The problem description contains the information about what the program needs to do. It is normally given to the programmer. Back to List

9 2. Problem Specification This is where the programmer (YOU !) takes the vague description and turns it into a clear, exact and unambiguous statement. The specification consists of three parts: Assumptions, Inputs and Outputs

10 2. Problem Spec (cont.) Problem Assumptions: sometimes called discussions. make clear any uncertainties or ambiguities within the statement. Problem Inputs: list the information to be given to the computer while the program is running. Problem Outputs: describe the outcome created by running the program. Back to List

11 3. Algorithm The programmer must decide on the logical steps needed to solve the problem - these steps form the algorithm. The algorithm is the plan used when creating the high level program. Back to List

12 4. Refinement The steps which make up the main algorithm can sometime be broken down into shorter steps and easier to follow instructions. This refines the algorithm and the process is called Stepwise Refinement. Back to List

13 5. Programming This process is known as coding. At this stage the algorithm is turned into a high level language program. This program is known as the source code. Back to List

14 6. Testing Once a program has been created it must be tested using test data where the results are known. Testing shows that the program works for normal data. It also shows that the program can deal with problem data. Testing must be as thorough as possible Back to List

15 7. Evaluation Evaluation is when the programmer looks back at what has been achieved: –does the program do what its asked to? –were there any problems? –what were the results of the testing? –what improvements could be made? Back to List


Download ppt "Programming Introduction. What is a program? Computers cannot think for themselves, they can only follow instructions. A program is a set of instructions."

Similar presentations


Ads by Google