How onkyou39/kursovaya-2-kurs works
Main Components
• Data Input Component – Responsible for reading the array of structures from the text file when the program starts.
• In-Memory Data Model – Represents the array of structures, including maintaining the “busy/free” flag and logical numbers.
• Operation Module – This component encapsulates all CRUD-style operations on the array:
– Creation of the array from the file.
– Updating an element’s fields.
– Querying (retrieving) an element by its logical number.
– Deleting an element (marking it free) and handling addition, including array “compression”.
– Getting counts (number of busy elements and number of rows).
• /Output Component – Handles printing the array on the screen.
• Data Output Component – Writes the busy elements back to the text file before the program terminates.
• Main Controller – The main routine (likely in Source.cpp) that ties the modules together; it sequences the reading, applying operations (possibly in an interactive or predetermined manner), output, and cleanup.
Relationships and Interactions
• The Main Controller initiates the Data Input Component to load the data.
• Once loaded, the In-Memory Data Model holds the array data.
• The Display/Output Component reads from the Data Model to show the current state of the array.
• Before termination, the Main Controller calls the Data Output Component to save changes back to the file.
• Optionally, a feedback loop from operations to the user (or console) can be visually represented if the application interacts with user inputs.
Architectural Patterns and Design Principles
• The separation between “data handling” (reading/writing files) and “data manipulation” (operations on the array) is key.
• The operations are performed on an in-memory data structure that is a central repository for all modifications.
• The data “compression” operation can be highlighted as a special procedure that deals with housekeeping and ensuring data consistency.
Relevant Technologies and Frameworks
• Visual Studio project files (Kursovaya 2 kurs.sln, .vcxproj, etc.) indicate a Windows-based C++ application.
• Standard C++ libraries are used for file I/O and array manipulation.
• Although no external frameworks are evident, the design can indicate “File I/O” and “Console Output” as self-contained modules.
• From the Data Model, show connections to the Operation Module, which encapsulates all operations (add, delete, modify, query, and compress).