Course Details
Course Information Package
Course Unit Title | PROGRAMMING PRINCIPLES I | ||||||||
Course Unit Code | ACSC182 | ||||||||
Course Unit Details | |||||||||
Number of ECTS credits allocated | 6 | ||||||||
Learning Outcomes of the course unit | By the end of the course, the students should be able to:
| ||||||||
Mode of Delivery | Face-to-face | ||||||||
Prerequisites | NONE | Co-requisites | NONE | ||||||
Recommended optional program components | NONE | ||||||||
Course Contents | Introduction to Computer Programming: Computer Systems: Hardware, Networks, Computer organization, Computer memory, Computer software, Running a program, High-level languages, Low-level languages, Compilers, Compiling and running a C program, Linkers. Programming and Problem-Solving: Algorithms, Logic Diagrams, Pseudocode, Flowcharts, Program design, Problem solving phase, Implementation phase, Programming guidance, Programming steps, Program creation, Object Oriented Programming (OOP), OOP characteristics, Software life cycle.
Programming Basics: A sample C program. Explanation of code. Program layout (include directives, main function, variables, comments). Running a C program. Testing and Debugging. Program errors. Variables and Assignments: Identifiers, Keywords, Declaring variables, Assignment statements, Initializing variables. Conditional Statements: Flow of Control. Branch. Designing the branch. Implementing the branch. if-else syntax. Boolean expressions. Relational operators. if-else flow of control. Logical operators. Compound statements. Program Style: Indenting, Comments, Constants. Using boolean expressions. Evaluating boolean expressions. Truth tables. Order of precedence. Precedence rules. Short-Circuit evaluation. Type bool and Type int. bool return values. Multiway branches. Nested statements. Nested if-else statements. Multi-way if-else statements. The switch-statement: syntax, the controlling statement, the break statement, the default statement, Switch-statements and menus. Blocks with local variables. Statement blocks. Scope rule for nested blocks.
Repetitive Statements: Loop statements. while-loop syntax, operation and flow of control. do-while loop. Infinite loops. Prefix & Postfix Increment/Decrement Operators. The for-statement. for/while loop comparison. Which loop to use. The break-statement. Designing Loops. Ending a loop: List headed by a size, Ask before iterating, List ended with a sentinel value. Running out of input. General methods to control loops: Count controlled loops, Exit on flag condition, Exit on flag caution. Nested loops. Debugging loops. Fixing Off by one errors. Fixing infinite loops. Tracing variables. Loop testing guidelines.
Program Modularity: Top-down design. Predefined functions. Function calls. Function call syntax. Function Libraries. Programmer-defined functions. Function declaration. Function definition. The return statement. The function call. Alternate declarations. Order of arguments. Function definition syntax. Placing definitions. Procedural abstraction. Information hiding. Formal parameter names. Local variables. Global constants and variables. void-functions, Call-by-reference parameters, Mixed parameter lists. Choosing parameter types.
Composite Data types: Declaring an array. The array variables. Array variable types. Indexed variable assignment. Loops and arrays. Constants and arrays. Array declaration syntax. Arrays and memory. Array index out of range. Out of range problems. Initializing arrays. Default values. Uninitialized arrays. Arrays in functions. Arrays as function arguments. Array parameter declaration. Function calls with arrays. Function call details. Array formal parameters. Array argument details. Array parameter considerations. Programming with arrays. Partially filled arrays. Searching arrays. The search function. Sorting an array. The selection sort algorithm. Sort algorithm development. Multi-dimensional arrays. Multi-dimensional parameters.
Laboratory Work: The role of the C programming language as a tool for solving simple and complex mathematical and engineering problems is emphasised through practical work carried out. | ||||||||
Recommended and/or required reading: | |||||||||
Textbooks |
| ||||||||
References |
| ||||||||
Planned learning activities and teaching methods | Students are taught the course through lectures by means of computer presentations. Laboratory work consists of practical problems aiming to help students understand and illustrate the programming concepts taught at lectures. Homework requires students to solve programmatically simple and complex mathematical and engineering problems. Lecture/Laboratory notes and presentations are available through the web for students to use in combination with the textbooks. | ||||||||
Assessment methods and criteria |
| ||||||||
Language of instruction | English | ||||||||
Work placement(s) | NO |