cppfor-2020-10
MicroConsult "C++ FOR" ONLINE Training
2020-10-26 to 2020-10-30
Kurszeiten (Kernzeit) 8:30 bis 16:30 (Freitag 12:30)
Mittagspause 12:30 bis 13:15
This page contains information about exercises and supplies additional Links not in the PDFs used in the training. The most recent exercise (the one that should be worked on) always comes first.
State-Machine Beispiele:
- https://godbolt.org/z/hsrYvb
- https://godbolt.org/z/rsne7M
- https://godbolt.org/z/GYT1hj
- https://godbolt.org/z/PnY9Ks
Current Exercise:
- https://godbolt.org/z/zzGYo4
- https://godbolt.org/z/an4sMc
- https://godbolt.org/z/xv13c1
- https://godbolt.org/z/TT8jx1
- https://godbolt.org/z/KcfxfG
- https://godbolt.org/z/ofbhqM
- Übung Schritt Clock-07 (Ergebnis -> Clock 08)
gemäß enthaltenem TODO.txt File- Code Reiview zu den gestellten Fragen
- Evtl. kleinere Erweiterungen vornhmen
- Link für Online Compiler: https://onlinegdb.com/ByYOTj8uD
- ZIP-Archiv für loalen Compiler: tbfe.de/data/uploads/mc-cppfor-ex/clock-07.zip
- Zu Vergleichszwecken der Code von Clock-07 in C++98:
- Link für Online Compiler: tbd
- ZIP-Archiv für lokalen Compiler: tbfe.de/data/uploads/mc-cppfor-ex/clock-07a.zip
- tbfe.de/data/uploads/infographics/ClassToMemoryMapping.png
- tbfe.de/data/uploads/infographics/DiamondShapedInheritance.png
- tbfe.de/data/uploads/infographics/MultipleInheritance.png
- tbfe.de/data/uploads/infographics/RuntimeTypeIdentification.png
- tbfe.de/data/uploads/infographics/Example-OpenClosePrinciple.png
- tbfe.de/data/uploads/infographics/TypeBasedBranching.png
Exercises and Solutions (in sequential order as done):
As exercises build upon each other, you may use the solution of the last exercise done as starting point for the next one. Depending on how close your solution is to the "official" one it may or may not be better to continue with your own solution.)
- Monday 1
- If you are planning to use the Online Compiler https://onlinegdb.com for doing the practical exercises try to make yourself acquainted with how to use it.
- start with this link https://onlinegdb.com/ryCNlz4dw
- clone the project (button on top)
- compile and run it (button on top)
- maybe read the README.txt (describes what you have)
- follow the instructions in the TODO.txt (describes what it should become)
- Optional parts in TODO.txt are not required to do
- If you are working with your locally installed compiler
- as above but start with that zip archive:
tbfe.de/data/uploads/mc-cppfor-ex/clock-00.zip
- as above but start with that zip archive:
- If you are planning to use the Online Compiler https://onlinegdb.com for doing the practical exercises try to make yourself acquainted with how to use it.
- Monday 2
- Clock-01 (will be turned into -> Clock-02): adding an interface to the class `Clock`
MAYBE ONLY REVIEW THE SOLUTION
(as linked as Clock-02 in the step after this)- Project with Online-Compiler: https://onlinegdb.com/ByYcOVVdD
- or ZIP-File for Local Compiler:
tbfe.de/data/uploads/mc-cppfor-ex/clock-01.zip
- Clock-02 (will be turned into -> Clock 03):
split `Counter` into `LimitCounter` and `OverflowCounter`
AS EXPLAINED BEFORE THE LUNCH BREAK
(follow the the instructions in the TODO.txt file)- Project with Online-Compiler: https://onlinegdb.com/H1SHFN4OP
- or ZIP-File for Local Compiler: tbfe.de/data/uploads/mc-cppfor-ex/clock-02.zip
- Clock-03 (Current Solution):
REVIEW SO YOU CAN ASK QUESTIONS- Project with Online-Compiler: https://onlinegdb.com/HJQpY4Nuv
- or ZIP-File for Local Compiler:
tbfe.de/data/uploads/mc-cppfor-ex/clock-03.zip
- Clock-01 (will be turned into -> Clock-02): adding an interface to the class `Clock`
- Monday 3
- Clock-03 (will be turned into Clock-04)
NVI-Principle gemäß TODO.txt-Beschrebung umsetzen- Project with Online-Compiler: https://onlinegdb.com/SkqtNvE_w
- or ZIP-File for Local Computer:
tbfe.de/data/uploads/mc-cppfor-ex/clock-03.zip
- Clock-04 (Current Solution):
REVIEW SO YOU CAN ASK QUESTIONS- Project with Online-Compiler: https://onlinegdb.com/HkSwcSBuw
- or ZIP-File for Local Computer:
tbfe.de/data/uploads/mc-cppfor-ex/clock-04.zip
- Clock-03 (will be turned into Clock-04)
- Tuesday 1
- …
- Tuesday 2
- …
- Zur Klasse `LimitCounter` ein Interface `Counter` hinzufügen wie im `TODO`-File beschrieben
- Project with Online-Compiler:
https://onlinegdb.com/S1lckKBOv - or ZIP-File for Local Compiler:
tbfe.de/data/uploads/mc-cppfor-ex/clock-04.zip - Solution with Online-Compiler:
https://onlinegdb.com/SyWLjFB_w - or Local ZIP-File:
tbfe.de/data/uploads/mc-cppfor-ex/clock-05.zip
- Project with Online-Compiler:
-
- …
- Wednesday 1
- …
- Wednesday 2
- …
- Wednesday 3
- …
- Thursday 1
- …
- Thursday 2
- …
- Thursday 3
- …
- Friday 1
- …
- Friday 2
- …
Links zu Live-Demos:
- https://godbolt.org/z/7nsf4f – Copy vs. Move
- https://godbolt.org/z/q6K8o5 – as before, slighty improved
- https://godbolt.org/z/KGGvr1 – new style cast demo
- https://godbolt.org/z/538T4j – lambda demo
- https://godbolt.org/z/EdER68 - "State-Machine" gemäß Kapitel Basics
Links zu Info-Graphiken:
- tbfe.de/data/uploads/infographics/ClassToMemoryMapping.png
- tbfe.de/data/uploads/infographics/DiamondShapedInheritance.png
- tbfe.de/data/uploads/infographics/MultipleInheritance.png
- tbfe.de/data/uploads/infographics/RuntimeTypeIdentification.png
- tbfe.de/data/uploads/infographics/Example-OpenClosePrinciple.png
- tbfe.de/data/uploads/infographics/TypeBasedBranching.png
- tbfe.de/data/uploads/infographics/SmartPointers.png
- tbfe.de/data/uploads/infographics/ParametrizedTypesAndSizes.png
Noch aufzuräumen:
https://godbolt.org/z/KcfxfG – Publisher-Subscriber
https://godbolt.org/z/adGKne - NamedValue als Template
https://godbolt.org/z/MKcY7G – Lambdas
https://godbolt.org/z/vzz1r3 – NamedInt (const char* -> std::unique_ptr)
https://godbolt.org/z/1s9e3q – Lambdas (nochmal ???)
https://godbolt.org/z/j5vxhK – enabe_if / if constexpr