The first chapter of the course addresses the construction of algorithms. Primitive objects are given with primitive operations upon them. It is shown how arbitrarily complex algorithms acting on the objects can be built using sequential, conditional, and iterative composition of algorithms. The emphasis is put on specifications and on the use of assertions to derive correct code. The Java programming language is used in a controlled way as a tool to make the algorithms amenable to execution by a computer.
The second chapter is concerned with the representation of data. Decimal, binary, octal and hexadecimal notations are reviewed as well as conversion algorithms from one notation to another. The two's complement representation for negative numbers is explained as well as the representation of floating point numbers. ASCII and Unicode representations for characters are described and discussed.
In the third chapter, the CPU of a simple computer is described together with its machine language. Students are taught how to write programs in this simple machine language. The design of subprograms with standard conventions for subprogram calls and returns as well as parameter passing is discussed in details as it allows the student to better understand procedure calls and parameter passing methods in higher level programming languages.
The fourth chapter addresses programming languages concepts in a more systematic way. The Java programming language is used to illustrate the concepts but no attempt is made to provide a global overview of Java. In contrast, a limited number of topics are studied with care and in details : primitive data types, literals, variables, arrays, the String class, static methods, expressions, a small subset of composed statements, primitive type conversions, method overloading. Classical algorithms for searching and sorting are build with this subset of Java.
|