BSc in Computer Science / Бакалавр в Области Компьютерных Наук

Course Details

Course Information Package

Course Unit TitlePROGRAMMING PRINCIPLES I
Course Unit CodeACSC182
Course Unit Details
Number of ECTS credits allocated6
Learning Outcomes of the course unitBy the end of the course, the students should be able to:
  1. Recognise the goals, capabilities and benefits of structured programming and the basis of algorithmic thought.
  2. Examine written programs and identify their function and underlying algorithmic logic.
  3. Demonstrate the ability to express elementary algorithms in the syntax of an imperative programming language (C++).
  4. Choose the appropriate data types, apply the correct operations, and form the necessary statements.
  5. Analyse simple problems, construct algorithms to programmatically solve them, and formulate corresponding programs using selective, iterative and sequential statements.
  6. Illustrate the ability to define and use one- and multi-dimensional arrays programmatically.
  7. Recognize and illustrate the predefined functions, and user-defined functions prototypes, definitions, and calls.
Mode of DeliveryFace-to-face
PrerequisitesNONECo-requisitesNONE
Recommended optional program componentsNONE
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.
Input and Output: Output using cout, Include directives, Escape sequences, Formatting real numbers, Showing decimal places, Basic cout manipulators, Input using cin, Reading data from cin, Designing input and output. Data Types and Expressions: Writing integer constants, Writing double constants, Other number types, Integer types, Floating point types, Type char, char constants, Reading character data, Type string, Type bool, Type compatibilities (int - double, char - int, bool - int), Arithmetic, Results of operators, Division of doubles, Division of integers, Integer remainders, Arithmetic expressions, Operator shorthand.

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
  • Walter Savitch, Problem Solving with C++, Addison-Wesley, 7th Ed., 2009
References
  • Harvey M. Deitel, Paul J. Deitel, C++ How to Program, Prentice Hall, 7th Ed., 2010
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
Lab Assignments20%
Tests20%
Final Exam60%
Language of instructionEnglish
Work placement(s)NO

 Печать  E-mail