A C++ console application that tabulates a piecewise-defined function over the interval [a, b] with a step size of h using Formula. The project includes source code, UML and Use Case diagrams, a flowchart, usage scenarios, and reports for laboratory assignments 1 and 2.
- Student: Sokurenko David
- University: National Technical University «Kharkiv Polytechnic Institute»
- Group: KN-226e
- Year: 2026
| Parameter | Description | Requirement |
|---|---|---|
| a | Starting value of x | Number |
| b | End value of x | Number, b ≥ a |
| h | Step size | Number, h > 0 |
| n | Loops limit | Integer, 2 ≤ n ≤ 10000 |
The value x = 0 is not calculated (division by zero); an error message is written to the results file for it.
- Input data (from keyboard or file)
- Calculate result
- Exit
When entering data via the keyboard, the letter q cancels the input and returns you to the main menu.
The file must be located in the same folder as the program and contain 4 numbers, each on a new line: a, b, h, n. Example: input.txt.
A table of x and y values is displayed in the console (for a very large number of results showing the first and last steps, as well as every 1000th step). All results are automatically saved to a file results.txt.
Use Case Diagram
Activity Diagram
Flowchart (screen transition diagram)
Use cases: docs/use_case_scenarios.md
The program uses Windows.h, so it runs on Windows (Visual Studio or MinGW):
g++ src/main.cpp -o tabulator.exe
tabulator.exe
C++ (Visual Studio), Visual Paradigm




