Skip to content

Commit e451188

Browse files
committed
Improve study path and foundations capstone guidance
1 parent 885c9b2 commit e451188

6 files changed

Lines changed: 188 additions & 44 deletions

File tree

STUDY_PLAN.md

Lines changed: 89 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -2,56 +2,112 @@
22

33
This plan assumes 5 study days per week, 60-90 minutes per day.
44

5-
## Week 1 - Foundations I
5+
## How To Use This Plan
66

7-
- Complete `01-foundations/types-and-io`
8-
- Complete `01-foundations/operators-and-expressions`
9-
- Complete `01-foundations/control-flow`
10-
- Complete `01-foundations/functions`
7+
1. Follow modules in order.
8+
2. For each module: read `README.md`, run `example/main.cpp`, solve `exercises/01.cpp` and `exercises/02.cpp`.
9+
3. Mark progress in `languages/cpp/CHECKLIST.md`.
10+
4. Use level capstones to combine concepts.
1111

12-
Deliverables:
12+
## Week 1 - Foundations Basics
1313

14-
- All exercises solved for these modules.
15-
- Notes on at least 3 common input/control-flow mistakes.
14+
Modules:
1615

17-
## Week 2 - Foundations II + First Capstone
16+
- `languages/cpp/01-foundations/types-and-io`
17+
- `languages/cpp/01-foundations/operators-and-expressions`
18+
- `languages/cpp/01-foundations/control-flow`
19+
- `languages/cpp/01-foundations/functions`
1820

19-
- Complete `01-foundations/arrays-and-vectors`
20-
- Complete `01-foundations/strings`
21-
- Complete `01-foundations/scope-and-lifetime-basics`
22-
- Complete `01-foundations/formatted-output-and-iomanip`
23-
- Build `languages/cpp/projects/01-foundations`
21+
Suggested pacing:
2422

25-
Deliverables:
23+
- Day 1: types-and-io
24+
- Day 2: operators-and-expressions
25+
- Day 3: control-flow
26+
- Day 4: functions
27+
- Day 5: exercise review + error fixes
2628

27-
- All exercises solved.
28-
- Foundations capstone runs from VS Code task flow.
29+
Done when:
2930

30-
## Week 3 - Core + Core Capstone
31+
- [ ] All 8 exercises from Week 1 are solved.
32+
- [ ] You can explain when to use `getline` versus `cin >>`.
33+
- [ ] You can write and call functions with clear parameters and return values.
3134

32-
- Complete all modules in `02-core`
33-
- Build `languages/cpp/projects/02-core`
35+
## Week 2 - Foundations Collections + Capstone
3436

35-
Deliverables:
37+
Modules:
3638

37-
- Core exercises solved.
38-
- Core capstone parses file input and writes output report.
39+
- `languages/cpp/01-foundations/arrays-and-vectors`
40+
- `languages/cpp/01-foundations/strings`
41+
- `languages/cpp/01-foundations/scope-and-lifetime-basics`
42+
- `languages/cpp/01-foundations/formatted-output-and-iomanip`
43+
44+
Capstone:
45+
46+
- `languages/cpp/projects/01-foundations`
47+
48+
Suggested pacing:
49+
50+
- Day 1-4: one module per day
51+
- Day 5: complete the foundations capstone and extensions
52+
53+
Done when:
54+
55+
- [ ] All Week 2 exercises are solved.
56+
- [ ] Capstone builds and runs from terminal and VS Code.
57+
- [ ] You can process lists of values and print formatted reports.
58+
59+
## Week 3 - Core Level + Capstone
60+
61+
Modules:
62+
63+
- `languages/cpp/02-core/input-validation`
64+
- `languages/cpp/02-core/algorithms-basics`
65+
- `languages/cpp/02-core/file-io-basics`
66+
- `languages/cpp/02-core/sorting-and-searching`
67+
- `languages/cpp/02-core/maps-and-frequency-counting`
68+
- `languages/cpp/02-core/error-handling-and-defensive-programming`
69+
70+
Capstone:
71+
72+
- `languages/cpp/projects/02-core`
73+
74+
Suggested pacing:
75+
76+
- Day 1-4: first four modules
77+
- Day 5: remaining modules + capstone start
78+
79+
Done when:
80+
81+
- [ ] You can validate user/file input safely.
82+
- [ ] You can sort/search data and build frequency summaries.
83+
- [ ] Core capstone generates the expected output report.
3984

4085
## Week 4 - Advanced + Expert Essentials
4186

42-
- Complete all modules in `03-advanced`
43-
- Complete `04-expert/memory-management-and-raii`
44-
- Complete `04-expert/smart-pointers-in-depth`
45-
- Build `languages/cpp/projects/03-advanced` and `languages/cpp/projects/04-expert`
87+
Modules:
88+
89+
- `languages/cpp/03-advanced/structs-and-classes`
90+
- `languages/cpp/03-advanced/constructors-and-invariants`
91+
- `languages/cpp/03-advanced/copy-and-move-semantics`
92+
- `languages/cpp/03-advanced/inheritance-and-polymorphism`
93+
- `languages/cpp/03-advanced/templates-basics`
94+
- `languages/cpp/04-expert/memory-management-and-raii`
95+
- `languages/cpp/04-expert/smart-pointers-in-depth`
96+
97+
Capstones:
98+
99+
- `languages/cpp/projects/03-advanced`
100+
- `languages/cpp/projects/04-expert`
46101

47-
Deliverables:
102+
Done when:
48103

49-
- Advanced/expert exercises solved.
50-
- Clear written explanation of ownership and thread safety basics.
104+
- [ ] You can design classes with clear invariants.
105+
- [ ] You can explain ownership (`unique_ptr`, `shared_ptr`, `weak_ptr`).
106+
- [ ] You can complete both advanced/expert capstones and explain tradeoffs.
51107

52108
## Weekly Review Checklist
53109

54-
- [ ] I can run every module example from terminal and VS Code.
55-
- [ ] I can explain why each exercise solution works.
56-
- [ ] I documented at least 2 bugs/mistakes I fixed this week.
110+
- [ ] I can run module examples from terminal and VS Code.
111+
- [ ] I can explain why each exercise solution is correct.
112+
- [ ] I documented at least 2 mistakes and how I fixed them.
57113
- [ ] I updated `languages/cpp/CHECKLIST.md`.
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# C++ Module README Style
2+
3+
Use this structure for every concept module under:
4+
5+
- `01-foundations`
6+
- `02-core`
7+
- `03-advanced`
8+
- `04-expert`
9+
10+
## Required Sections
11+
12+
1. `## Quick Run`
13+
2. `## Topics Covered`
14+
3. `## Common Pitfalls`
15+
4. `## Exercise Focus`
16+
5. `### Exercise Specs`
17+
6. `## Checkpoint`
18+
19+
## Section Rules
20+
21+
- `Quick Run`: include compile + run commands for `example/main.cpp`.
22+
- `Topics Covered`: short bullets of key concepts only.
23+
- `Common Pitfalls`: practical mistakes beginners actually make.
24+
- `Exercise Focus`: one bullet per exercise with task summary.
25+
- `Exercise Specs`: for each exercise define input, output, and at least 2 edge cases.
26+
- `Checkpoint`: 3-5 measurable learning outcomes as checkboxes.
27+
28+
## Writing Guidelines
29+
30+
- Keep explanations short and practical.
31+
- Prefer concrete examples over theory-heavy text.
32+
- Use the same naming style as folder names (kebab-case paths).
33+
- Keep all content in English.

languages/cpp/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ This track teaches C++ through small, runnable programs and focused exercises.
1111
5. [04-expert](./04-expert/README.md)
1212

1313
Use progress tracking: [CHECKLIST.md](./CHECKLIST.md)
14+
15+
Module README format reference: [MODULE_README_STYLE.md](./MODULE_README_STYLE.md)
1416

1517
## Modules By Level
1618

languages/cpp/projects/01-foundations/README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,28 @@
44

55
Build a console program that reads student names and scores, then prints summary statistics.
66

7+
## Quick Run
8+
9+
```bash
10+
g++ -std=c++17 -Wall -Wextra -pedantic main.cpp -o foundations_capstone
11+
./foundations_capstone
12+
```
13+
714
## Requirements
815

916
- Ask for number of students.
1017
- Read each student name with `getline` and score with numeric validation.
18+
- Keep score input in the range `0` to `100`.
1119
- Print all student records.
1220
- Print minimum score, maximum score, and average score.
1321

22+
## Concepts Practiced
23+
24+
- Input handling with `cin` and `getline`.
25+
- Loops and conditionals.
26+
- `vector` for dynamic storage.
27+
- Basic statistics: min, max, average.
28+
1429
## Sample Input
1530

1631
```text
@@ -35,7 +50,14 @@ Minimum: 77
3550
Maximum: 91
3651
```
3752

53+
## Common Pitfalls
54+
55+
- Forgetting to clear the newline after reading numeric input.
56+
- Accepting invalid scores without retrying.
57+
- Dividing by zero when no students are provided.
58+
3859
## Extension Ideas
3960

4061
- Add grade letters (A/B/C).
4162
- Sort output by score.
63+
- Print pass/fail counts using a threshold.

languages/cpp/projects/01-foundations/main.cpp

Lines changed: 41 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,50 @@ struct Student {
88
int score;
99
};
1010

11-
int main() {
11+
int readPositiveCount() {
1212
int count = 0;
13-
std::cout << "How many students? ";
14-
std::cin >> count;
13+
while (true) {
14+
std::cout << "How many students? ";
15+
if (!(std::cin >> count)) {
16+
std::cout << "Invalid number. Try again.\n";
17+
std::cin.clear();
18+
std::cin.ignore(std::numeric_limits<std::streamsize>::max(), '\n');
19+
continue;
20+
}
21+
if (count <= 0) {
22+
std::cout << "Please enter a positive number.\n";
23+
std::cin.ignore(std::numeric_limits<std::streamsize>::max(), '\n');
24+
continue;
25+
}
1526

16-
if (count <= 0) {
17-
std::cout << "Please enter a positive number.\n";
18-
return 0;
27+
std::cin.ignore(std::numeric_limits<std::streamsize>::max(), '\n');
28+
return count;
1929
}
30+
}
2031

21-
std::cin.ignore(std::numeric_limits<std::streamsize>::max(), '\n');
32+
int readScore(const std::string& studentName) {
33+
int score = 0;
34+
while (true) {
35+
std::cout << "Score for " << studentName << " (0-100): ";
36+
if (!(std::cin >> score)) {
37+
std::cout << "Invalid score. Enter a number from 0 to 100.\n";
38+
std::cin.clear();
39+
std::cin.ignore(std::numeric_limits<std::streamsize>::max(), '\n');
40+
continue;
41+
}
42+
if (score < 0 || score > 100) {
43+
std::cout << "Score out of range. Enter a value from 0 to 100.\n";
44+
std::cin.ignore(std::numeric_limits<std::streamsize>::max(), '\n');
45+
continue;
46+
}
47+
48+
std::cin.ignore(std::numeric_limits<std::streamsize>::max(), '\n');
49+
return score;
50+
}
51+
}
52+
53+
int main() {
54+
const int count = readPositiveCount();
2255

2356
std::vector<Student> students;
2457
students.reserve(static_cast<std::size_t>(count));
@@ -27,10 +60,7 @@ int main() {
2760
Student student;
2861
std::cout << "Student name " << (i + 1) << ": ";
2962
std::getline(std::cin, student.name);
30-
31-
std::cout << "Score for " << student.name << " (0-100): ";
32-
std::cin >> student.score;
33-
std::cin.ignore(std::numeric_limits<std::streamsize>::max(), '\n');
63+
student.score = readScore(student.name);
3464

3565
students.push_back(student);
3666
}

templates/concept-template/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Concept Template
22

33
Use this template when creating a new concept module.
4+
For the C++ track, also follow `languages/cpp/MODULE_README_STYLE.md`.
45

56
## Quick Run
67

0 commit comments

Comments
 (0)