The Corner Grocer App is a console application written in C++ and Python used for performing quantity calculations from a provided grocery list text file. Possible quantity calcuations include:
- Calculating the frequency of each item from the grocery list text file.
- Calculating the frequency of a single item from grocery list the text file.
- Creating a histogram of quantities of each item grocery list from the text file.
Througout the project, C++ was used to create the user interface and handle use input and Python was used for data management.
- What did you do particularly well?
Overall, I feel that there was actually quite a bit that went well with this project. I am very happy with how the user interface printing and input handling turned out, as I was able to reuse the code for multiple projects. This allowed me to improve and refine the overall setup of this within the code with each project until it became very straightforwared to get new error-handled inputs and print menus, title, etc. to the console.
- Where could you enhance your code? How would these improvements make your code more efficient, secure, and so on?
One of the major ways that I feel I could enhance this code would be to take advantage of an object oriented architecture. I would do this by creating a class to handle individual grocery list objects: storing the name, quantity, etc. of the object. This would then allow me to more efficiently handle all of the items within the grocery list, especially if it does not change between actions. I would also add options to the program to load a new grocery list, preventing the program from having to load the same grocery list from the text file to perform a different calcuation.
- Which pieces of the code did you find most challenging to write, and how did you overcome this?
Overall, I do not believe I actually found any pieces of the code particularly challenging throughout the development of this project. A lot of the skills needed for this project had been covered in previous modules to a point that I believe the development process proceeded very smoothly throughout the completion of the entire project.
- What skills from this project will be particularly transferable to other projects or course work?
One of the main skills learned within this project that will be particularly transferrable to other projects or course work is the ability to interface with other programming languages. Doing this successfully creates a lot of potential within a project, as all programming languages have their own set of strengths and weaknesses. Doing this allows you to take advantage of one programming language's weakness that may be a different programming language's strength. You have to be careful when doing this though, as not all programming languages will work properly with each other or even be able to interface with each other at all.
- How did you make this program maintainable, readable, and adaptable?
The main way that I attempted to make this program maintainable and adaptable was to make it as modular as possible. All different functions within the program are created as individual "modules" that can be linked together in a number of different ways. For example, any part of the program has the ability to quickly get a fully validated int input within a range of potential numbers by performing a single function call. This makes that programm extremely adaptable and extremely maintainable. To make the program readable, I made sure to use in-line comments wherever needed and followed industry-standard syntax and naming conventions for both C++ and Python, respectively.