C/C++ Programming
Dr
T. Kalganova, Room H204, ext. 2829. E-mail: tatiana.kalganova@brunel.ac.uk
Each week during the semester you are required to attend 2 one-hour lectures and 1 three-hour tutorial (there will be no tutorial in the first week). The timetable for 2000 is:
Lectures: Tue 12am - 01pm LC112 Fri 10am - 11am LC217 Tutorials: Fri 15pm - 16pm LC062 Labs: Mon 14pm - 17pm HC60/59 Consultation Times: Tue 01pm - 03pm H204 (other times: please Email to make an appointment)Students successfully completed this subject will be
able to: to write straightforward code in C/C++; use a modern development
environment and set up a Project structure, understand the nature of Object
Orientation and be able to define and use classes and objects in C++,
understand that modern software development is increasing oriented towards
integration of subsystems, rather than dependent only on one-off custom-built
code.
Please let me know if you find any bugs or typos in the handouts and I'll fix them.
General information about course
1. Introduction to the Development Process: History of C/C++, relation to Pascal. Console application and Event-driven applications. Graphical design tools; projects; edit/compile/debug cycle; development options; Example 1. the development cycle. Download (838 KB)
2. Data, Variables and Calculations : Program structure; the main() function; comments; names, types, enum and typedefs. Calculations and arithmetic operators; logical and bitwise operators. Scope, global variables. Importing console I/O: IOStreams. Download (881 KB)
3. Decisions and Loops: Comparison and use of operators: if ... else; switch ... Loops: for, continue, break; while and do ... while. Example 2: coding in C and C++ from Pascal; debugging and breakpoints. Download (721 KB)
4. Data Structures: Arrays, pointers and references; structures: structs from Pascal records. Dynamic memory allocation: new, delete; the heap. Download (1,982 KB)
5. Functions: Parameters: call by value, call by reference; return values and void. Relation to Pascal. Event driven programming; winmain() and the message loop; winproc() and the message functions. Example 3: design of functions and data structures in the Windows (R) environment. Download (383 KB)
6.
Object-Oriented Programming
Object-oriented paradigm.
Objects. Class. Inheritance.
Download (2,227 KB)