* NOTE: This unit may be considered on-going, as concepts and skills are used all throughout year 1 and 2.
Introduction to programming
DISCUSSION TOPICS:
Explain the essential features of a computer language. For example, as the human needs for computer systems have expanded it is necessary to abstract from the basic operations of the computer. It would take far too long to write the type of systems needed today in machine code.
Explain the need for higher level languages. For example, as the human needs for computer systems have expanded it is necessary to abstract from the basic operations of the computer. It would take far too long to write the type of systems needed today in machine code.
Outline the need for a translation process from a higher level language to machine executable code. For example, compiler, interpreter, virtual machine.
Discuss the features of modern programming languages that enable internationalization. For example, use of UNICODE character sets.
State the fundamental operations of a computer. These include: add, compare, retrieve and store data. Complex capabilities are composed of very large numbers of very simple operations.
Distinguish between fundamental and compound operations of a computer. For example, “find the largest” is a compound operation.
Discuss the ethical and moral obligations of programmers. For example, adequate testing of products to prevent the possibilities of commercial or other damage. Acknowledging the work of other programmers. The main aims of the Open Source movement should be known.
Discuss the need for sub-programmes and collections within programmed solutions. Show an understanding of the usefulness of reusable code and program organization for the individual programmer, team members and future maintenance. LINK General principles of computational thinking, connecting computational thinking and program design.
HANDS-ON TOPICS:
Define the terms: variable, constant, operator, object.
Define the operators =, ≠, <, <=, >, >=, mod, div.
Analyse the use of variables, constants and operators in algorithms. For example, identify and justify the use of a constant as opposed to a variable in a given situation.
Construct algorithms using loops, branching. Conditional statements - IF...THEN...ELSE. Boolean operators - AND (&&), OR (II), NOT (!)
Describe the characteristics and applications of a collection. Contains similar elements.
Construct algorithms using the access methods of a collection.
Outline the standard operations of collections. These are: addition and retrieval of data. E.g. database program
Construct programs using pre-defined sub-programmes, one- dimensional arrays and/or collections.
Terms:
Syntax - The arrangement of words and phrases to create well-formed sentences in a language. The formal rules governing the construction of valid instructions. In java, an example could be missing a semicolon ";" at the end of a line. In this case you get a syntax error.
Semantic - The meaning of a word or sentence. The set of rules that gives the meaning of instructions in a language. In programming, an example could be something like this: if (grade < 60) {output "Passed!"}
3 Kinds of Errors: Syntax, Semantic, Runtime. (Know how to explain and give examples of each)
References:
1) Syntax and Semantics (p177, p179)
2) High Level Language and Low level Language (p18-22, p187, p225)
3) Compilers and Interpreters (p226-227)
4) Steps in the compilation process (p226)
Arrays: Students should know how to create and manipulate data in an Array and simulate algorithms into a trace table.