Date |
Key Concepts |
2025.2.4 ch.0
ch.1
ch.2
code
|
- Introduction
- Syllabus
- Briefing computer systems: CPU & memory
- First C++ program: Hello, C++
- Basic io: cin/cout
- Supplementary materials
- Data types, variables, operators
- Variable declaration & the computation model (concept of memory address)
- Data types: int, double, string, bool
- Basic operators: arithmetic (+-*/%), assignment (=)
- (FYR) Michael Lewin, All About XOR, 2012
- Flow controls
- Branching (if-else) with relational & logical operators
|
2025.2.5 code
|
- Flow controls (cont'd)
- Branching (switch-case-default-break, A?B:C)
- Loops (while, do-while, for)
- Some algorithms
- Simple sum: 1 ~ 100
- Greatest common divisor
- Random integers
- Compounding
- Monte Carlo simulation for π
- Binary search
- Jump statements (break, continue)
- Nested loops
|
2025.2.6 ch.3
ch.4
code
|
- Flow controls (cont'd)
- Data structures & algorithms
- Arrays
- Zero-based indexing: Why starting from 0?
- Descriptive statistics: max, min, sum, mean, and standard deviation
- Sorting: bubble sort, selection sort, insertion sort
- Random permutation: shuffling
- char arrays and C++ strings
- 2D arrays
- Functions
- User-defined function
- Call stack & variable scope
- Function overloading
- Special issue: int main(int argc, char** argv)
- Recursion: factorial
|
2025.2.7 ch.5
ch.6
code
|
- Functions (cont'd)
- Recursion: sum, gcd, Fibonacci numbers
- Pointers
- Syntax & concepts
- Pass by address: swap
- Pointer vs. array
- Dynamic memory allocation: heap, new / delete
- 2D arrays (static vs. dynamic)
- Function pointer
- typedef: alias for your own need
- Constant pointers
- C++ syntaxes: reference, auto
- Structures
- Linked list & binary tree
- Preprocessor, compilation, and linking
- Debugger: gdb
- APCS 近年考題清單
- Take-home-message
|
Promotion |
|