COS 201: Computer Programming I

 

 

Learning Outcomes
At the end of this course, students should be able to:
1. explain the principles of good programming and structured programming concepts;
2. explain the programming constructs, syntax and semantics of a higher-level language;
3. describe the chosen programming language variables, types, expressions, statements and assignment; simple input and output;
4. describe the programme control structures, functions and parameter passing, and structured decomposition; and
5. develop simple programs in the taught programming language as well as debug and test them.

Course Contents
Essentials of computer programming. Types of programming: Functional programming, Declarative programming, Logic programming, object-oriented programming. Scripting languages, structured programming principles. Basic data types, variables, expressions, assignment statements, and operators. Basic object-oriented concepts: abstraction, objects, classes, methods; parameter passing; encapsulation. Class hierarchies and programme organisation using packages/namespaces. Use of API – use of iterators/enumerators, List, Stack, Queue from API. Searching; sorting; Recursive algorithms. Event-driven programming: event-handling methods; event propagation; exception handling. Introduction to Strings and string processing. Simple I/O; control structures; Arrays. Simple recursive algorithms, inheritance, polymorphism.
Lab work: Programming assignments; design and implementation of simple algorithms e.g. average, standard deviation, searching and sorting. Developing and tracing simple recursive algorithms. Inheritance and polymorphism.