-
Notifications
You must be signed in to change notification settings - Fork 0
Course contents (draft)
- the command-line
- navigating the filesystem
- invoking the compiler
- using an editor: micro (or notepad++)
- writing our first
hello_world.cpp
- plain old data (POD) types:
bool
,int
,float
,double
- the
std::string
class - command-line arguments
- the
std::vector
class - range-based
for
loop - the
auto
keyword
- the
while
loop -
do
-while
loop -
switch
statement - jump statements:
break
andcontinue
- conditional (ternary) operator (
?:
) - using functions
- defining functions
- variable scope: global, block, function
- default arguments for functions
- function overloading
- returning values from functions
- references
-
const
for variables -
const
for pass-by-reference - references,
const
&auto
in range-basedfor
loops - pass by value vs. pass by reference
- the
inline
keyword - the function stack and recursion
- relationship to scope
-
terminal I/O
-
file input/output
-
introduce concept of RAII?
-
relate to scope
-
handling file paths
-
introducing first project: DNA shotgun sequencing (?)
- exercise: implement loading function for project
- separate code into header and cpp files
- how to compile and link at the command-line
- explain C preprocessor in more detail
- automated build systems
- Make, CMake, Ninja, ...
- introduce our custom
build
script
- explain namespaces (in particular
std
)- what they are, no need for students to know how to define their own
- grouping data using struct
- categoricals using
enum
-
aggregation, composition, inheritance
-
object lifetime & ownership
-
OOP design principles (SOLID):
- DRY (Don’t repeat yourself)
- Encapsulate What Changes
- Open Closed Design Principle
- Single Responsibility Principle
- Dependency Injection or Inversion principle
- Favor Composition over Inheritance
- Liskoff substitution principle
- Interface Segregation Principle
- Programming for Interface not implementation
- Delegation principles
-
UML overview
-
UML class diagrams
-
typical workflow for the OOP design
- Peer marking
- go through solution and marking scheme
- ...?
-
difference between compiled and interpreted languages
-
the preprocessor and directives
-
the
#include
statement -
the compile & link process
-
C vs. C++
-
dynamic vs. static type checking
-
namespaces - the
std::
namespace -
namespaces - how to define & use your own
-
single-line comments
-
multi-line comments and why they're usually best avoided
-
editing a file
-
compiling a program
-
using the command-line
-
file path concepts (absolute, relative)
-
shortcuts for special folders (
.
,..
,~
) -
running a command - even when not in the PATH, or in the current folder
-
debugging a program - using a debugger?
-
anatomy of a command - arguments & options
-
statements
-
compound statements
-
std::vector
-
std::string
-
difference between
std::vector::operator[]
andstd::vector::at()
in terms of bounds checking -
checking for errors
-
throwing exceptions
-
handling exceptions
-
standard arithmetic operators
-
comparison operators
-
logical operators
-
operator precedence
-
standard data types
-
expressions with mixed types, implicit type casting, integer promotion, ...
-
const
for variables -
const
for pass-by-reference -
const
for member methods -
the
<cmath>
header and associated functions -
list initialisers
-
control flow
-
if
statement -
nested
if
statements -
regular
for
loop -
range-based
for
loop -
while
loop -
do
-while
loop -
switch
statement -
jump statements:
break
andcontinue
-
conditional (ternary) operator (
?:
) -
references
-
using functions
-
defining functions
-
pass by value vs. pass by reference
-
returning values from functions
-
default arguments for functions
-
function overloading
-
variable scope: global, block, function
-
spreading projects over multiple files
-
multiple files: implications for compiling & linking
-
function recursion
-
the program stack
-
inline functions
-
struct
-
enum
-
file I/O
-
OOP principles: encapsulation, polymorphism, inheritance, abstraction
-
classes
-
member functions: mutators, accessors, facilitators
-
constructors
-
member initialisation
-
destructors
-
static data members
-
copy constructor
-
virtual functions
-
pure virtual functions
-
abstract and concrete classes
-
inheritance vs. composition
-
member function overloading
-
difference between virtual and overloaded functions
-
static / dynamic binding
-
OOP design - REQUIRES A LOT OF THOUGHT!
-
UML
-
composition / aggregation / inheritance
-
operator overloading
-
friend functions
-
overloading the stream insertion operator
-
operator overloading: global or member?
-
this
pointer -
overloading the assignment operator
-
function templates
-
class templates
-
runtime vs. compile-time/static polymorphism
-
new
/delete
-
memory leaks
-
double free
-
array
new[]
&delete[]
-
using constructor / destructor / copy constructor / assignment operator to manage memory
-
RAII
-
object lifetime & ownership
- relationship to composition & aggregation, etc.
-
OOP design principles (SOLID):
- DRY (Don’t repeat yourself)
- Encapsulate What Changes
- Open Closed Design Principle
- Single Responsibility Principle
- Dependency Injection or Inversion principle
- Favor Composition over Inheritance
- Liskoff substitution principle
- Interface Segregation Principle
- Programming for Interface not implementation
- Delegation principles
-
- how to teach design?
- how to assess design?
- how to teach design?
- how to assess design?