Editing
Business Requirement Document
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== 4. Functional Requirements == <span id="fr-01-prime-generation"></span> === FR-01 — Prime Generation === * The system shall accept a <code>generate</code> command-line argument to trigger prime-number generation. * The system shall test every odd integer from 3 upward for primality using trial division. * The system shall store each confirmed prime in the database in ascending order of discovery. * Generation shall continue until the candidate number reaches 999,999,999. <span id="fr-02-trial-division-algorithm-correctness"></span> === FR-02 — Trial-Division Algorithm Correctness === * For each candidate number N, the system shall divide N by each known prime p where p ≤ √N. * If any p divides N exactly (remainder = 0), N is composite and shall not be stored. * If no p ≤ √N divides N, N is prime and shall be persisted. <span id="fr-03-prime-reporting"></span> === FR-03 — Prime Reporting === * The system shall accept a <code>report</code> command-line argument to trigger report generation. * The system shall read all stored primes from the database in sequence order. * The system shall write a paginated, formatted print file containing all primes. <span id="fr-04-print-report-format"></span> === FR-04 — Print Report Format === * The report shall contain a page heading (“primes overview”) and column headers on each page. * Each data line shall display six prime entries side by side: sequence number and prime value. * Each page shall carry a page-number footing. * The print record width shall be 132 characters. * The report shall be written to a file named <code>primes.prt</code>. <span id="fr-05-operational-logging"></span> === FR-05 — Operational Logging === * The system shall write progress and status messages to the system console throughout execution. * Each message shall identify the issuing program name and paragraph. <span id="fr-06-error-handling"></span> === FR-06 — Error Handling === * The system shall log an error message and stop cleanly if an unrecognised command-line argument is provided. * The system shall log an error message and stop cleanly if the print file cannot be opened. * The system shall log database connection or cursor failures and set an error indicator before exiting. ----- <span id="non-functional-requirements"></span>
Summary:
Please note that all contributions to Webhuis wiki are considered to be released under the GNU Free Documentation License 1.3 or later (see
Project:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
View history
More
Search
Navigation
Voorpagina
Cobol and PostgreSQL
PostgreSQL
CFEngine
Proxmox
Webhuis Kennisbank
Basale infra
Webhuis bouwstenen
Webhuis configuratie
Webhuis Infra
Webhuis Support
Webhuis Raspberry
Opzet Applicaties
Business Applicaties
Community portal
Current events
Recent changes
Random page
Help
sitesupport
Tools
What links here
Related changes
Special pages
Page information