Latest Module Specifications
Current Academic Year 2025 - 2026
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Description This module introduces students to the C and C++ programming languages and the fundamentals of data structures and algorithms. Students develop practical programming skills through a set of software design and implementation exercises. Students will also develop and demonstrate an understanding of how object-oriented concepts enable appropriate code design and structure to extend existing C/C++ code, enabling them to integrate their own code with large-scale software systems and gain a fundamental understanding of software system design principles. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Learning Outcomes 1. Demonstrate an understanding of the fundamentals of the C/C++ programming languages and object-oriented design 2. Implement code in C/C++ that demonstrates an understanding of fundamental static and dynamic data structures (arrays, linked-lists, queues and stacks) and fundamental algorithms (searching and sorting methods) 3. Implement solutions to problems in C and C++ with an emphasis on practical engineering problem-solving 4. Design and implement C++ code that requires extension of existing code, demonstrating an understanding of object-oriented programming principles and software design 5. Design and implement C++ programs that graphically illustrate/animate the operation of the student's solutions to given problems | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
All module information is indicative and subject to change. For further information,students are advised to refer to the University's Marks and Standards and Programme Specific Regulations at: http://www.dcu.ie/registry/examinations/index.shtml |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Indicative Content and Learning Activities
Fundamentals of C Structure of a C programme. Compilation and linking processes. Overview of C language syntax. Primitive data types. Variables, declaration, initialization and assignment. Constants and literals. Machine-level representation of integral and floating-point types. Type conversion and casting. Operators, precedence and expression evaluation order. Flow Control Conditional execution, if-else and switch statements, while, do-while, for loops, break and continue statements. Nested loops. Simple numerical processing algorithms. Functions Function call and return semantics. Local variables and scope. Pointers to functions in C. Recursive functions. Function call stack overhead. Pointers, Arrays and Strings in C Arrays and Pointers. Pointer arithmetic. The C string library. Simple string processing algorithms. Function pointer parameters (C pass-by-reference). Relation/differences between arrays and pointers. Elementary Data Structures in C structs, enums, nested structures, multi-dimensional arrays. Passing structures to and from functions. C programme design as data structures plus functions. Introduction to Algorithms in C Binary search and simple sorting methods. Introduction to Computational Complexity. Source Code Translation Header and source files, pre-processor directives, header guards, extern declarations, forward declarations, standard and user-defined C libraries, compilation versus linking, using an IDE to manage source files. Structuring large C programmes as user-defined libraries. Introduction to C++ Relationship between C and C++. C++ header files, namespaces, cout and cin from the standard C++ library. Basic C language features in use in C++ programmes: variables, loops, and simple functions. Introduction to OOP Concepts Introduction to Object-Oriented Programming and Design. Limitations of user-defined data types (structs) in C. Objects in OOP: variables with data plus behaviour. Classes as user-defined types tailored to the problem being solved. Some New C++ Features Namespaces in C++. Overloaded functions. Overloaded Operators. References in C++. Passing references to functions. Reference to const as function parameter. 'Pass-by-Value' and 'Pass-by-Reference' and passing pointers (C-style pass-by-reference). Returning references from functions. Dynamic memory allocation in C++: new and delete operators. Introduction to Classes in C++ Creating and using classes. Public and private class members. Constructors: the default/parameterless constructor, constructors with parameters, multiple/overloaded constructors, member initialization lists. Passing objects to functions and returning objects from functions. Copy constructors: Copy initialization versus copy assignment. Deep copying an object. Memory management/protective copying. Lifetime/lifecycle of objects. Class destructors. More C++ Arrays of objects and arrays of pointers to objects. Static class members. Static variables and static methods. The 'this' pointer: returning a reference to this object from a class method. Returning reference to const, and const member methods. Summary of the use of the const keyword in different contexts. Anonymous and temporary objects. Dynamic Data Structures in C++ Linked Lists, Stacks and Queues implemented using Linked Lists. Templated classes/data types. Composition Relationship between Classes in C++ Composition relationship between classes. Lifecycles of objects and member initialization. Composition in OOP design with examples. Requirements for a well-designed library interface (API). Inheritance between Classes in C++ Uses and advantages of inheritance in OOP. Syntax for inheritance between classes - derivation access specifiers. Protected base class members. References and pointers of base class type - polymorphic types. Virtual methods and method overriding. Virtual methods and run-time polymorphism. Inheritance of interface vs inheritance of implementation. Order of construction and destruction in class hierarchy. Virtual destructors. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Indicative Reading List Books:
Articles: None | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Other Resources
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||