Presentation is loading. Please wait.

Presentation is loading. Please wait.

Mr C Johnston ICT Teacher www.computechedu.co.uk BTEC IT Unit 06 - Lesson 01 Introduction to Computer Programming.

Similar presentations


Presentation on theme: "Mr C Johnston ICT Teacher www.computechedu.co.uk BTEC IT Unit 06 - Lesson 01 Introduction to Computer Programming."— Presentation transcript:

1 Mr C Johnston ICT Teacher www.computechedu.co.uk BTEC IT Unit 06 - Lesson 01 Introduction to Computer Programming

2 Session Objectives Be able to describe what a computer program is, Have an understanding of some of the information required to produce a program for a client, Discuss different programming paradigms and some of the associated advantages and disadvantages.

3

4

5 What is a Program? A computer is a ‘dumb’ machine. Everything the computer does is in response to program instructions. Its processor can obey a fixed set of instructions (e.g. add two numbers together). Called the instruction set. A program tells the processor what to do.

6 Programs… Low and High Level Processor instructions are in binary codes Binary code is very hard for humans to read Therefore almost all programs are written in ‘High level’ languages These have ‘English like’ instructions rather than binary codes e.g. Binary Code:00100110 11001011 High level code:Profit = Sales - expenses

7 Procedural Approach Most approaches to dealing with the complexity of modern programs involve splitting programs into different sections. These are called modules or procedures. The procedural approach to programming involves dividing the overall system into different procedures which work together to provide all the required functionality.

8 Object Orientated Approach One problem with the procedural approach is the interaction between the procedures can create too much complexity itself. To try to resolve this problem the Object Orientated (OO) approach was developed. The OO approach splits a system into objects. Objects interact with each other in a different way to procedures.

9 OO vs Procedural Programs consist of instructions and data. In the procedural approach the procedures in a system share data. In the OO approach the data is ‘hidden’ inside the object. Object Data Object Data Object Data procedure Data

10 OO / Procedural Comparison The procedural approach is good for writing relatively simple programs. Its also conceptually simpler so its often used when first learning to write programs. However its not such a good approach for developing complex systems. The OO approach, while conceptually more difficult to understand is often used for very complex systems. The OO approach can be difficult to understand for first time programmers.

11 BTEC Book – Unit 06 p4/5

12 Event Driven The Event driven approach to programming is used in Windows software environments. Event driven programs can be written using either the procedural or the OO approach. With the event driven approach a program responds to user events such as clicking a menu or button

13 Event Driven Programming The Event driven approach to programming is used when creating programs which use the Windows user interface or other GUI Event driven programs can be written using either the procedural or the OO approach. With the event driven approach a program responds to user events such as clicking a menu or button In an event driven system there are two main parts to the program: An event handler which waits for an event to occur. When it does it asks the appropriate event procedure to deal with it. Event procedures. These must be created to deal with each event that the program responds to. It is not suitable for writing programs which don’t use the windows user interface.

14 Procedural Programming Languages Definition of paradigm Likely advantages and use Likely disadvantages and what not used for

15 Definition of paradigm Likely advantages and use Likely disadvantages and what not used for Object Orientated Programming Languages

16 Definition of paradigm Likely advantages and use Likely disadvantages and what not used for Event Driven Programming Languages

17 P1Evidence For P1 you need to produced some PowerPoint slides on the applications and limitations of procedural, object orientated and event driven programming approaches, Ensure your slides conform to standard practices – i.e. not too much text on slides and explanation in speaker notes. When considering the different program paradigms you should give some examples of the type of program these approaches should be used for, When covering limitations you should explain the likely disadvantages of each approach and what sort of applications they would not be normally used for, You are expected to reference all three paradigms within your work. P1 – describe the application and limits of procedural, object orientated and event driven programming paradigms


Download ppt "Mr C Johnston ICT Teacher www.computechedu.co.uk BTEC IT Unit 06 - Lesson 01 Introduction to Computer Programming."

Similar presentations


Ads by Google