The Standard-Deviation Calculator is a compact Java Swing application
that computes the population standard deviation (σ) of every integer in the range
[a, b]. It reveals each intermediate step so students can document their
methodology in lab reports.
Name: Julia Chen – 20-year-old Mechanical-Engineering student.
| Age | 23 |
|---|---|
| Major | Electrical Engineering (B.Eng.) |
| Location | Montreal, Canada |
| Tech Stack | macOS 14, OpenJDK 21, IntelliJ IDEA Edu |
Background. Joe is in his final undergraduate year and currently works as a teaching assistant for a first-year “Engineering Computation” course. He frequently prepares tutorial slides and lab demos where students must calculate statistical measures, but many of his tutees struggle to interpret the black-box outputs of conventional calculators.
Joe launches the Standard-Deviation Calculator before a lab session,
inputs the dataset bounds a = 5, b = 30, and presses
Evaluate. The application streams the mean, variance, and each
squared deviation into a scrollable log.
Joe clicks Save Steps, drags the exported .txt file into
Overleaf, and instantly embeds the derivation in his slide deck.
During class, when a student suggests a different range, Joe simply edits the
numbers, re-runs, and projects the updated steps live—eliminating chalkboard
arithmetic.
| Trait | Level / Note |
|---|---|
| Tech Enthusiasm | High – builds hobby IoT projects |
| Teaching Passion | Very High – enjoys mentoring peers |
| Patience for Errors | Moderate – wants instant, clear feedback |
| Design Sensitivity | Prefers minimalist UIs over cluttered dashboards |
“If students can see every calculation unfold, they stop guessing and start understanding.”
The single-window interface (JFrame) uses BorderLayout:
a and b plus an Evaluate button.JTextArea that streams the step-by-step log.a (integer)b (integer)Live document listeners flag non-numeric keys; if a > b, a dialog offers to swap the bounds.
| ID | Requirement | Rationale / Note |
|---|---|---|
| FR-01 | The system shall compute the population standard deviation σ for the integer range [a, b]. | Core functionality. |
| FR-02 | The system shall display each intermediate step (partial sums, mean μ, variance σ², final σ) in chronological order. | Transparency for learning. |
| UR-01 | The GUI shall validate numeric input in real time and highlight errors. | Reduces user frustration. |
| UR-02 | Error dialogs shall propose corrective actions (e.g., “Swap bounds?”). | Helpful feedback mandate. |
| IR-01 | The implementation shall rely solely on core Java 21 and Java Swing—no external libraries. | “From scratch” rule. |
| QR-01 | The codebase shall compile with javac on any JDK 21 without IDE-specific tooling. | Tool-agnostic build. |
| QR-02 | The system shall throw a custom InvalidBoundException when a > b. | Explicit exception handling. |
| PR-01 | For |b − a| ≤ 106, total computation time shall be < 500 ms on a 2 GHz CPU. | Performance ceiling. |
| PR-02 | Peak RAM usage shall remain below 100 MB. | Ensures laptop compatibility. |
| UR-03 | The GUI shall offer a Save Steps export option. | Stakeholder request. |
| QR-03 | The test suite shall achieve ≥ 95 % statement coverage. | Quality assurance. |
| Input (a, b) | σ Result |
|---|---|
| 1, 5 | 1.414 213 562 |
| 10, 20 | 3.162 277 660 |
| 100, 150 | 14.577 379 736 |
The revised design focuses exclusively on standard-deviation computation, meeting the “from scratch” requirement while delivering step-by-step transparency for undergraduate users like Julia Chen.
Cite any external statistical references or algorithmic derivations here using IEEE, APA, or your program’s preferred format.