You are looking at lesson 7. Your place is still lesson 8, task 1: Memory.
hw/07-gradebook: the functions go to gradebook.c, main to main.c, and the comments in gradebook.h become Doxygen. The program behaves as in topic 6.
Checklist
The gradebook, version 2: the same behaviour, but in modules. The hw/07-gradebook folder already has four files for you to fill in and two test files you don't need to change.
gradebook.c – move your functions from hw/06-gradebook/main.c here: read_grades, print_grades, average, highest, lowest, sort_grades, find_grade, print_distribution. Each with an assert for its precondition, as in topic 6. Delete the (void) lines and the TODOs.main.c – move main here. No functions stay in it, and MAX_GRADES comes from gradebook.h.gradebook.h – the list of functions is already written; don't change it, because the tests call it. Rewrite the comments as Doxygen: @file and @brief at the top, and for every function @brief, @param, @return (if it returns something) and @pre. Delete the TODO.CMakeLists.txt is ready, as in step 7: gradebook.c is the library hw07_gradebook_lib and main.c the program hw07_gradebook. Read it: these are the same commands.
ctest --preset debug -L hw07
hw07_functions – unit_tests.c calls your functions through gradebook.h with the known grades 8 10 7 9 10. While the functions are empty:
Assertion failed: nearly_equal(average(grades, 5), 8.8), file .../hw/07-gradebook/unit_tests.c, line 20
The message says which function returned the wrong thing, and with what data.
hw07_precondition – average(grades, 0) must stop at your assert.
hw07_gradebook_1–3 – the same three output tests as in topic 6: the program must behave exactly the same.
hw07_doxygen, hw07_contracts, hw07_main – file tests: gradebook.h has the Doxygen tags, gradebook.c has assert(, no TODO is left anywhere, and MAX_GRADES 30 is defined only in gradebook.h.
Commit and push. Actions → Points: HW 7 (Gradebook in modules), 10 points when all eight tests pass.
In topic 9 the gradebook gets students' names, so the list in gradebook.h will grow.
Each one ticks itself when you do it.
All six done. You know your way around.
It is laid out like CLion: the same panels in the same places. This tour shows each one, and you can reopen it any time with Tour.
Switches the left panel: Lesson plan, Project files, Changes. Click the active icon again to hide the panel.
In CLion: the tool window bar runs down the left edge, too.
This part is not on this task: it appears when a task needs it.
Every task in this lesson. Now marks your place. Clicking a task only lets you look; it never moves your place. Project files and Changes open here too.
In CLion: this spot holds the Project view (the file tree).
This part is not on this task: it appears when a task needs it.
Opens the file for your task by itself. A tab appears for each file the step opens. The breadcrumbs above the code show the folder.
In CLion: the same editor tabs and breadcrumbs.
This part is not on this task: it appears when a task needs it.
Diff shows what changed, like git diff: red is the old code, green the new.
In CLion: the diff view in the Commit window looks the same.
This part is not on this task: it appears when a task needs it.
Terminal for build commands, Database to see your tables. They open by themselves when a task needs them. Drag the top edge to resize.
In CLion: Terminal, and the Database tool window.
This part is not on this task: it appears when a task needs it.
What to do now, right above the code, so you never miss it. Numbered notes in the code explain the important lines. Details shows what you should see and a hint.
In CLion: no equivalent: this is your lecturer's guide.
This part is not on this task: it appears when a task needs it.
Done is the only button that moves you forward. Look back lets you review without losing your place.
This part is not on this task: it appears when a task needs it.
Guided, Focus code or Floating. You can drag the panel edges too. Your layout is remembered for next time.
In CLion: you can also rearrange and hide tool windows.
This part is not on this task: it appears when a task needs it.
Six small missions. Each one ticks itself when you do it, so you know you have found everything.