om .c s er ap eP m e tr .X w w w Scheme of work – Cambridge IGCSE® Computer Studies (US) 0441 Unit 5: Programming concepts Recommended prior knowledge Students need to have studied Units 3 and 4 before starting this unit. Context Students need to study this unit before or alongside Unit 12. It progresses from representing algorithms as program flowcharts in Unit 4, to representing algorithms as pseudocode. For both Units 4 and 5, together with Unit 6, Computer Studies Support Booklet - Part 3 (http://teachers.cie.org.uk/docs/dynamic/31798.pdf) provides notes on section 3 of the syllabus and practice problems (with answers in Computer Studies Support Booklet - Answers (http://teachers.cie.org.uk/docs/dynamic/31801.pdf). Outline The concepts of sequence, selection and repetition. Input, output, totalling and counting in pseudocode and structured pseudocode for iteration (repetition) and selection. Writing an algorithm in pseudocode and identifying and correcting errors in pseudocode. Low-level languages, reasons for their use and their need to be translated by an assembler. High-level languages, reasons for their use and their need to be translated by a compiler or interpreter. Syllabus ref Learning objectives 3.2.1 The concept of a program 3.2.3 v1 2Y05 Low-level languages Suggested teaching activities Learning resources Students need to understand: • what a computer program is • the main requirements of a programming language to allow: • data input and output • manipulation of data of various types and structures • sequence, selection, repetition and subprogram intercommunication • the concepts of totals and counting. LWS coursebook pp. 255–6 and 265–70 Students should perform practical exercises to: • write algorithms in pseudocode to solve a variety of problems • identify errors and suggest corrections in a given piece of pseudocode. Introduce students to different types of programming languages by considering: Cambridge IGCSE Computer Studies (US) 0441 LWS coursebook pp. 256–7 1 Syllabus ref Learning objectives Suggested teaching activities Learning resources • www.teachict.com/gcse/software/programming_languages/miniweb/p g3.htm Introduction to machine language • • • historical origins of computer programming in machine-specific types of language (machine language and assembly language) the characteristics of these languages the need for an assembler translation program for assembly language why they are still used for certain applications. www.teachict.com/gcse/software/programming_languages/miniweb/p g4.htm Introduction to assembly language www.teachict.com/gcse/software/programming_languages/miniweb/p g6.htm Introduction to translation programs for high-level language 3.2.2 High-level languages Students need to identify: • the characteristics of these languages • the need for compiler and/or interpreter translation programs for these languages • why they are preferred for many applications. Extension work: www.mstracey.btinternet.co.uk/pictutorial/picmain.htm Tutorial on programming a microcontroller, illustrating the suitability of assembly language for dealing with input and output devices LWS coursebook pp. 257-9 www.teachict.com/gcse/software/programming_languages/miniweb/p g5.htm Introduction to high-level language www.teachict.com/gcse/software/programming_languages/miniweb/p g6.htm Introduction to translation programs for high-level language Extension work: • http://en.wikipedia.org/wiki/History_of_compiler_writing History of compiler writing v1 2Y05 Cambridge IGCSE Computer Studies (US) 0441 2 Syllabus ref Learning objectives Suggested teaching activities Learning resources • 3.2.4 Pseudocode structures Students do not need to be able to write program code in any particular language for Papers 1 or 3, but should perform practical exercises to develop recognition, understanding and writing of the following pseudocode: • processes: • input (e.g. INPUT, READ, ENTER) • output (e.g. OUTPUT, WRITE, PRINT) • assignment (e.g. Count ← 1) • totals (e.g. Sum ← Sum + Number) • counting (e.g. Count ← Count + 1). • structures: • iteration (repetition): • WHILE…DO…ENDWHILE: WHILE xxx DO xxx ENDWHILE • REPEAT…UNTIL: REPEAT xxx xxx UNTIL xxx • FOR…TO…NEXT: http://en.wikipedia.org/wiki/Fortran First high-level language to have a complete compiler • http://en.wikipedia.org/wiki/FLOW-MATIC The first programming language to express operations using English-like statements LWS coursebook pp. 260–5 www.unf.edu/~broggio/cop2221/2221pseu.htm Examples of an approach to pseudocode that is very close to plain English FOR y ← xxx TO xxx xxx xxx NEXT v1 2Y05 Cambridge IGCSE Computer Studies (US) 0441 3 Syllabus ref Learning objectives 3.2.4 Pseudocode structures (cont) Suggested teaching activities • Learning resources selection: • IF…THEN…ELSE…ENDIF: IF xxx THEN xxx ELSE xxx ENDIF or nested: IF xxx THEN IF xxx THEN xxx ELSE xxx ENDIF ELSE IF xxx THEN xxx ELSE xxx ENDIF ENDIF v1 2Y05 Cambridge IGCSE Computer Studies (US) 0441 4 Syllabus ref Learning objectives 3.2.4 Pseudocode structures (cont) Suggested teaching activities • Learning resources CASE OF…OTHERWISE…ENDCASE: CASE y OF n1: xxx xxx n2: xxx OTHERWISE xxx or multiple statements indented below ENDCASE 3.2.5 v1 2Y05 User guide, technical documentation This should already have been adequately covered in Unit 3: 2.2.3. Cambridge IGCSE Computer Studies (US) 0441 5