An Introduction to the Imperative Part of C++
Postgraduate course, Taipei Medical University, Department of Medical Engineering, 2024
Teaching Overview
This course provides a comprehensive introduction to programming through the imperative core of the C++ language. It is designed specifically for postgraduate students in the Department of Medical Engineering at Taipei Medical University, many of whom come from non-computing backgrounds. The course content is adapted from a long-established version taught at Imperial College London, with a strong emphasis on practical problem-solving using ANSI/ISO standard C++ and the GNU g++ compiler.
Students engage in a structured sequence of lectures and lab-based exercises using a UNIX-like development environment. By the end of the course, they gain hands-on experience in core programming constructs, procedural abstraction, debugging, and file I/O — essential skills for computational biomedical applications.
Teaching Contributions
As the lecturer, I delivered all lectures and supervised the associated practical sessions, covering the following topics:
Lecture 1: Introduction to Programming with C++
History of C++, program structure, compilation, and first program walkthrough.Lecture 2: Data Types and Variables
Primitive types, identifiers, constants, type casting, and enumerations.Lecture 3: Expressions and Input/Output
Arithmetic expressions, shorthand operators, and standard I/O handling.Lecture 4: Control Structures I – Branching
Conditional logic usingif,else, andswitchstatements.Lecture 5: Control Structures II – Looping
Iterative constructs:for,while,do-while, nested loops, and scope.Lecture 6: Functions and Modular Design
Function definitions, parameter passing (by value and reference), and overloading.Lecture 7: Arrays and Strings
One- and two-dimensional arrays, string handling, and manipulation.Lecture 8: Pointers and Dynamic Memory
Pointer syntax, dynamic memory management, and pointer arithmetic.Lecture 9: File Handling and Streams
File I/O using streams, input/output formatting, and error checking.Lecture 10: Introduction to Object-Oriented Concepts
Basic classes and objects, constructors, and encapsulation.Lecture 11: Recursion and Linked Structures
Recursive functions, the call stack, and linked list construction.Lecture 12: Debugging and Development Tools
Use ofg++, Emacs, and GDB; debugging practices usingassert, test stubs, and drivers.
Learning Materials
Lecture Notes and Code Examples
All exercises and examples are written in ANSI/ISO standard C++ and tested using the GNU g++ compiler.Recommended Textbooks
- Walter Savitch, Problem Solving with C++ (10th Edition), Pearson, 2018.
- Bjarne Stroustrup, Programming Principles and Practice Using C++ (3rd Edition), Pearson, 2024.
Assessment Framework
60% Final Written Examination
Tests theoretical understanding, code reasoning, and C++ syntax proficiency.40% Programming Project
A modular software project involving implementation, documentation, and evaluation of a C++ application relevant to biomedical or scientific computation.
This course equips students with foundational programming skills, enabling them to engage with computational methods and develop technical fluency for research or industry applications in medical engineering.