- UCAS course code
- F3FA
- UCAS institution code
- M20
Course unit details:
Object-Oriented Programming in C++
Unit code | PHYS30762 |
---|---|
Credit rating | 10 |
Unit level | Level 3 |
Teaching period(s) | Semester 2 |
Offered by | Department of Physics & Astronomy |
Available as a free choice unit? | No |
Overview
Object-Oriented Programming in C++
Pre/co-requisites
Unit title | Unit code | Requirement type | Description |
---|---|---|---|
Introduction to Programming for Physicists | PHYS20161 | Pre-Requisite | Compulsory |
A working knowledge of programming at the level of PHYS20161 and an interest in programming.
Aims
- To learn the fundamentals of Object Oriented Analysis and Design.
- To become fluent in the C++ programming language.
- To develop good programming style.
- To be able to apply coding quickly and efficiently to realistic (physics) applications.
Learning outcomes
Syllabus
1. The basic properties of C++: constants; boolean data-types; pointers and references; dynamic memory allocation; function overloading.
2. Data streams: standard input/output; managing files.
3. Classes and objects: encapsulation; access functions; constructors and destructors; arrays of objects; friends; operator overloading; assignment operator; shallow and deep copying; this pointer.
4. Inheritance: base and derived classes; access specifiers; overriding functions; multiple inheritance.
5. Polymorphism: base class pointers; abstract base classes; virtual and pure virtual functions; interface classes.
6. Structuring programs: header files; multiple source files; namespaces.
7. Advanced C++ features: static data; templates; runtime type checking; error handling and exceptions.
8.The C++ Standard Library; the boost library; other libraries.
Feedback methods
Feedback will be offered orally by demonstrators in lab-based sessions when they mark lab-based projects. Written feedback will be provided with final project marks.
Recommended reading
Study hours
Scheduled activity hours | |
---|---|
Lectures | 10 |
Practical classes & workshops | 10 |
Independent study hours | |
---|---|
Independent study | 80 |
Teaching staff
Staff member | Role |
---|---|
Niels Walet | Unit coordinator |
Malcolm Gray | Unit coordinator |