The Corner Grocer project was designed to solve a practical inventory analysis problem by processing a chronological text log of daily grocery purchases to help the store optimize its produce section layout. To accomplish this, the program aggregates the raw purchase data, calculates the exact frequency of each item, and provides an interactive terminal menu for users to search specific items, view comprehensive numerical lists, or display a text-based graphical histogram. I was particularly successful in implementing an Object-Oriented Programming structure, utilizing an ItemTracker class to separate the core data management logic from the main application execution. By leveraging a standard C++ map, I ensured the program could rapidly and efficiently process duplicate items without relying on slow, complex iterative search loops, allowing the system to scale easily even with high-volume transaction data.
While the program meets all current functional requirements, I could enhance the code in the future by replacing the flat-file text input with a direct integration into a relational database using SQL. Transitioning from text processing to a robust database query system would make the application more secure and highly efficient for real-time data ingestion, eliminating the need for local backup files. The most challenging aspect of this project was managing the input stream states during the user menu loop, particularly when handling unexpected string inputs that caused the program to crash. I overcame this by studying C++ exception handling and stream state flags, implementing a robust try-catch block that safely resets the input buffer and clears error flags without terminating the application.
The technical skills solidified in this project are directly transferable to larger operational environments, particularly in supply chain systems operations and continuous improvement initiatives. Understanding how to securely capture raw transaction data, aggregate it efficiently, and output clean metrics is foundational for designing enterprise-level inventory tracking software. Furthermore, I ensured this program remains highly maintainable and adaptable by strictly adhering to industry standards. By separating the class definitions into header files, writing clear in-line comments detailing the logic of each function, and utilizing descriptive variable names, I guaranteed that other developers or systems analysts could easily read, troubleshoot, or expand upon this codebase in the future.