Skip to content

Latest commit

History

11 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

Just Build It! C++

Programming Fundamentals, One Working Program at a Time

© 2026 Alan Gandy. Licensed under CC BY 4.0.

A complete two-course textbook for publication in StudySite.ai. Twenty-four chapters, seven appendices, and twenty-three verified reference programs.

Inspired by Programming Fundamentals (Richard Halterman), restructured for the Student Learning Outcomes of a two-semester sequence.


Status

Chapters24 of 24 complete
Appendices7 of 7 complete
Reference programs23 of 23 — all compile clean, all run to a normal exit
Figures17 — all WCAG-conformant SVG with PNG renders
Structural checks14/14 passing on every chapter
Total~524 pages, ~114,000 words

Contents

Course I — Programming Fundamentals (Chapters 1–12)

ChFileVersion
101-computing-data-and-the-software-landscape.md
202-from-source-code-to-running-program.mdv0.1
303-values-variables-and-data-types.mdv0.2
404-expressions-arithmetic-and-errors.mdv0.3
505-algorithmic-design-and-documentation.mdv0.4
606-conditional-execution.mdv0.5
707-iteration.mdv0.6
808-using-library-functions.mdv0.7
909-writing-functions.mdv1.0
1010-managing-functions-and-data.mdv1.1
1111-arrays.mdv1.2
1212-vectors-and-strings.mdv1.3 — Course I capstone

Course II — Object-Oriented Programming (Chapters 13–24)

ChFileVersion
1313-software-development-lifecycle.mdv2.0
1414-structs.mdv2.1
1515-file-streams-and-persistence.mdv2.2
1616-debugging-and-testing.mdv2.3
1717-searching-and-sorting.mdv2.4
1818-classes-and-objects.mdv2.5
1919-refining-classes.mdv2.6
2020-inheritance.mdv3.0
2121-polymorphism.mdv3.1
2222-memory-management.mdv3.2
2323-templates-and-the-stl.mdv3.3
2424-exceptions-release-and-the-road-ahead.mdv4.0 — release

Appendices

FileContents
Aappendix-a-setting-up.mdStudySite editor, Codespaces, local VS Code; debugger setup
Bappendix-b-command-line-development.mdCompiling, running, sanitizers, makefiles, Git
Cappendix-c-debugger-reference.mdOne-page debugger reference, VS Code and gdb
Dappendix-d-coding-standard.mdThe style guide every listing conforms to
Eappendix-e-glossary.md340 terms, alphabetized, cross-referenced
Fappendix-f-slo-coverage-matrix.mdEvery SLO mapped to chapters and evidence

Supporting material

PathContents
LSCUP/grade-calculatorAll 23 reference programs, plus build-all.sh and run-all.sh
LSCUP/just-build-it-examplesStandalone textbook examples organized by chapter
figures/17 SVG figures with PNG renders and per-chapter manifests

Editorial rules this book follows

The completeness rule. Every chapter's Grade Calculator version compiles, runs to completion, and produces correct output for the features it has. A version may be missing features; it is never missing an ending. Verified by the build-all.sh and run-all.sh scripts in LSCUP/grade-calculator.

No planted defects. Every version in the companion code repository is correct for the features it has. Where a chapter needs students to see a failure, they induce it themselves by changing something in a working build — including the Chapter 16 debugging lab, where students seed three defects into their own code and then restore it.

No dead ends. Students are never asked to build something that will be discarded. Where the book must argue for a design, it prints the alternative itself and analyzes it — Chapter 20 §20.2 — rather than assigning work that gets thrown away.

Every claim verified. All compiler messages are real g++ output. All expected outputs were captured by running the code. All arithmetic in worked examples was checked programmatically.

Reference-only content is labelled. Topics covered but not used in the project — command-line arguments, bitwise operators — say so explicitly, in the section heading and the key terms.


Technical decisions

DecisionChoice
Language standardC++17
EnvironmentsStudySite.ai editor; GitHub Codespaces
LibrariesStandard library only
BuildOne command; no build system required
InterfaceConsole, interactive, menu-driven
VoiceSecond person
FiguresHand-authored SVG with role, <title>, <desc>, aria-labelledby, plus prose long descriptions
ExercisesGenerated by StudySite from chapter source; the book supplies runnable examples with expected output

The running project

Students build one application across both courses. It is versioned so that every chapter ends with a working program.

Course I builds a complete points-based grade calculator: named assignments, bonus points, a user-defined letter scale, a multi-student roster, class statistics, and drop-lowest.

Course II generalizes it. Weighted-category grading — recorded as an explicit out-of-scope note in Chapter 1 — is analyzed in Chapter 13, designed in Chapter 20, and delivered in Chapter 21, where a third grading scheme is added with no edits to any existing class.

That traced requirement is the book's spine and its primary evidence for SLO 2.1. Appendix F documents the full trail.


Verifying the reference programs

git clone https://github.com/LSCUP/grade-calculator.git
cd grade-calculator
./build-all.sh # 23 compile clean under -Wall -Wextra
./run-all.sh # 23 run to exit code 0

To build and run any single version:

cd grade-calculator/v3.1
g++ -std=c++17 -Wall -Wextra *.cpp -o gradecalc
./gradecalc

Notes for import

Figures are referenced as figures/chNN-figN-name.svg. StudySite does not currently render Mermaid, so every figure is hand-authored SVG — which also gives better accessibility than Mermaid's generated output. PNG renders at 2× sit beside each SVG for any pipeline that prefers raster. Per-chapter manifests (figures/manifest-chNN.json) list every asset.

Each figure appears three ways: alt text, a numbered caption, and a prose long description that conveys the same information completely. A screen-reader user gets everything a sighted reader does.


License

Just Build It! C++ (the book text, figures, and exercises) is licensed under CC BY 4.0. Share and adapt freely, including commercially, with attribution.

The code examples in the companion repositories are separately licensed under the MIT License.

About

Just Build It! C++ — a complete two-course programming textbook with 24 chapters, seven appendices, accessible figures, and verified companion code.

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages