1 / 16

Mr C Johnston ICT Teacher computechedu.co.uk

BTEC IT Unit 06 - Lesson 01 Introduction to Computer Programming. Mr C Johnston ICT Teacher www.computechedu.co.uk. 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,

josh
Download Presentation

Mr C Johnston ICT Teacher computechedu.co.uk

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


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

  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. 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.

  4. 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

  5. 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.

  6. 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.

  7. Data procedure procedure procedure 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 Object Object Data Data Data

  8. 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.

  9. BTEC Book – Unit 06 p4/5

  10. 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

  11. 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.

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

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

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

  15. 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. P1 – describe the application and limits of procedural, object orientated and event driven programming paradigms • 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.

More Related