Module Specifications.
Current Academic Year 2024 - 2025
All Module information is indicative, and this portal is an interim interface pending the full upgrade of Coursebuilder and subsequent integration to the new DCU Student Information System (DCU Key).
As such, this is a point in time view of data which will be refreshed periodically. Some fields/data may not yet be available pending the completion of the full Coursebuilder upgrade and integration project. We will post status updates as they become available. Thank you for your patience and understanding.
Date posted: September 2024
| |||||||||||||||||||||||||||||||||||||||||||
None Resits are available for both the terminal examination and continuous assessment elements |
|||||||||||||||||||||||||||||||||||||||||||
Description This module introduces students to the C and C++ programming languages and fundamental object-oriented design and programming principles. 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 principles 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 engineering principles. The module also reviews basic computer architectures and computer language fundamentals, so that students understand the connection between programming and the common underlying digital hardware / computational machinery. | |||||||||||||||||||||||||||||||||||||||||||
Learning Outcomes 1. Describe and explain the basic operation of computer hardware and differentiate between types of programming language and execution model 2. Demonstrate an understanding of the fundamentals of the C/C++ programming languages and object-oriented design 3. Implement code in C that demonstrates an understanding of the underlying computational machine, including its limitations 4. Implement solutions to problems in C and C++ with an emphasis on practical engineering problem-solving 5. Design and implement C++ code that requires extension of existing code, demonstrating an understanding of object-oriented programming principles and software design 6. 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
Introduction and ContextOverview of computer hardware/architecture. Computer language levels. Translation schemes and execution models: compilers versus interpreters. Abstraction in programming: imperative vs declarative languages, procedural vs object-oriented programming languages.Fundamentals of CStructure of a C programme. 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: arithmetic, logical, relational, and bit-wise operators. Operator precedence and expression evaluation order.Flow Controlif-else statements, switch statements, while loops, do-while loops, for loops, break and continue statements. Nested loops. Simple numerical processing algorithms.FunctionsFunction call and return semantics. Local variables and scope. Pointers to functions in C. Recursive functions. Function call stack overhead.Pointers, Arrays and Strings in CArrays 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 Cstructs, enums, nested structures, multi-dimensional arrays. Passing structures to and from functions. C programme design as data structures plus functions.Source Code TranslationHeader and source files, pre-processor directives, header guards, extern declarations, forward declarations, standard and user-defined C libraries, compilation and linking processes, using an IDE to manage source files. Structuring large C programmes as user-defined libraries.Introduction to C++Relationship between C and C++. Some simple C++ examples. 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 ConceptsIntroduction to Object-Oriented Programming and Design. Limitations of user-defined data types (structs) in C. Objects in OOP: variables with data plus behaviour. Classes: user-defined types tailored to the problem being solved. Class Diagrams: Composition relationship. Inheritance between classes. Overriding methods. Abstract methods and abstract classes. Polymorphism. C++ a “better” C language: comparison of handling strings in C and C++. Review of general principles towards good OOP design.Some New C++ FeaturesNamespaces 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++General class declaration/definition syntax. Creating and using a class. 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. Writing classes as separate declarations and definitions.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. Child class calling base class methods. Virtual methods and run-time polymorphism. Inheritance of interface vs inheritance of implementation. Abstract base classes - pure virtual methods. Interface inheritance vs implementation inheritance. Note on object slicing. Subclass Constructors. Order of construction and destruction in class hierarchy. Virtual destructors. Cloning in lieu of virtual constructors. | |||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||
Indicative Reading List
| |||||||||||||||||||||||||||||||||||||||||||
Other Resources None | |||||||||||||||||||||||||||||||||||||||||||