Skip to content

Commit

Permalink
add draft of syllabus - still at WIP stage
Browse files Browse the repository at this point in the history
  • Loading branch information
jdtournier committed Oct 31, 2024
1 parent ab528c8 commit ef37299
Show file tree
Hide file tree
Showing 2 changed files with 103 additions and 0 deletions.
6 changes: 6 additions & 0 deletions index.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ title: Object-Oriented Programming (5CCYB041)

---

## Syllabus

See [here for the full list of topics covered on this course](https://kcl-bmeis.github.io/OOP/syllabus).

---

## Slides

Week 1:
Expand Down
97 changes: 97 additions & 0 deletions syllabus.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
---
layout: default
title: Syllabus - Object-Oriented Programming (5CCYB041)
---

# Syllabus for Object-Oriented Programming (5CCYB041)

## The Unix command-line
- What is the command-line, the terminal, and the shell
- The filesystem, absolute & relative paths
- Basic commands: `ls`, `pwd`, `cd`, `cp`, `mv`, `rm`, ...
- Command structure, arguments & options

## Compiling a C++ program
- difference between *compiled* and *interpreted* languages
- invoking the compiler
- useful compiler flags: `-o`, `-O2`, `-Wall`, `-c`, `-I`, `-g`
- different stages of compilation: preprocessor, compiler, linker
- compiling and linking programs split over multiple files
- using build systems to simplify building complex programs
- using the `oop_build` script supplied as part of this course

## Basic structure of a program
- the `main()` function
- preprocessor directives, particularly `#include`
- difference between using inverted commas `""` and angled brackets `<>` in `#include` directive
- handling command-line arguments
- return value / exit code

## Data types & variables
- Basic data types: `int`, `short`, `char`, and their `unsigned` versions, `float`, `double`, ...
- declaring a variable
- defining a variable
- the `auto` keyword
- Compound data types: structs & classes
- Dynamic vs. static type handling
- Basic operators: `=`, `+`, `-`, `*`, `/`, `%`, `++`, `--`, `<<`, `>>`, `+=`, `-=`, `*=`, `/=`
- implicit type conversions

## Control flow
- the `if`/`else` statement
- statements & compound statements
- the standard `for` loop
- the range-based `for` loop
- the `while` loop
- the `do`/`while` loop
- conditional operators: `==`, `!=`, `<`, `>`, `<=`, `>=`
- compound conditional expressions using logical operators: `&&`, `||`, `!`
- the conditional (ternary) `?:` operator

## Functions
- purpose of functions (control flow, code re-use, code clarity, ...)
- function declaration vs. definition
- general syntax
- function arguments, default arguments
- return statement, return type
- function overloading
- `inline` keyword
- lambda functions
- lambda capture
- use of lambda functions in STL algorithms

## Namespaces
- what they are, and their purpose
- `using` declaration
- why indiscriminate use of `using namespace std;` is discouraged
- declaring your own namespace (not assessed)

## Classes
- simple `struct`, difference between `struct` & `class`
- declaration & definition
- general syntax
- `public`, `protected`, `private`
- methods / member functions
- special methods: constructor, copy-constructor, destructor

## Inheritance


## OOP design
- SOLID principles and others
- prefer composition over inheritance
- Resource acquisition is initialisation (RAII)

## Templates

## The Standard Template Library
- useful containers: `std::vector`, `std::array`, `std::string`
- the `std::ranges` library
- useful algorithms: `std::ranges::sort()`, `std::ranges::max()`, `std::ranges::min()`, `std::ranges::find()`, ...

## Memory management (for information only - not assessed, and *not* to be used in course)
- pointers
- C-style arrays
- memory allocation & deallocation using `new` & `delete`
- array allocation & deallocation using `new[]` & `delete[]`
- why use of raw pointers and manual memory management is to be avoided unless absolutely necessary

0 comments on commit ef37299

Please sign in to comment.