Describe the most challenging aspect of the


Programming Assignment #1: Grocery Store

This assignment attempts to serve as a refresher for concepts that I hope you learned in CS 122. In this assignment, you will be building a simple storefront for a small grocery store called Jack's Mart. The store maintains its inventory in a text file. Not being very tech savvy, the owner of Jack's Mart needs you to build a program to read from and maintain the list of currently stocked items. The program will also simulate a simple shopping cart in which customers may add items.

File Format

Your program should read a file called "grocery_list.txt" (see included file for an example file). Each line of the file contains one grocery item. Each item contains three pieces of information: the name of the item, the item's quantity, and the item's cost. Each piece of information is separated by a colon (:). For example, "cheese:5:6" means that the item's name is "cheese", that there are 5 pieces of cheese in stock, and that each piece of cheese costs $6.

Program Flow

Your program should operate in the following manner:

• Open the file "grocery_list.txt".
• Read the names and quantities of items from the text file.
• Prompt the user for the amount of money that they currently have.
• Until the shopper decides to exit, do the following:

o Display a menu with the currently stocked items, their cost, and their quantities.
o Ask the shopper what they'd like to add to their cart.
o If the item exists and there is sufficient quantity, add the item to their cart.
o If the item does not exist, let the user that the item is not in stock.
o If the item costs more than what the users has, let the user know that they have insufficient funds to make the purchase.
o Update the list of items currently in stock to reflect the new quantities.

• After the user has decided to exit, display the current contents of the shopping cart along with how much was spent and how much money the user has left over.

• Note that the program should also write back to "grocery_list.txt" with the updated quantity of items.

Header Comment, and Formatting

1. Be sure to modify the file header comment at the top of your script to indicate your name, student ID, completion time, and the names of any individuals that you collaborated with on the assignment.

2. Remember to follow the basic coding style guide. For a list of basic rules or examine my example files from previous assignments and labs.
Reflection Essay

In addition to the programming tasks listed above, your submission must include an essay that reflects on your experiences with this homework. This essay must be at least 350 words long. Note that the focus of this paper should be on your reflection, not on structure (e.g. introductory paragraph, conclusion, etc.). The essay is graded on content (i.e. it shows deep though) rather than syntax (e.g. spelling) and structure. Below are some prompts that can be used to get you thinking. Feel free to use these or to make up your own.

• Describe a particular struggle that you overcame when working on this programming assignment.

• Conversely, describe an issue with your assignment that you were unable to resolve.

• Provide advice to a future student on how he or she might succeed on this assignment.

• Describe the most fun aspect of the assignment.

• Describe the most challenging aspect of the assignment.

• Describe the most difficult aspect of the assignment to understand.

• Provide any suggestions for improving the assignment in the future.

Deliverables

You must upload your program and reflection as a ZIP file through the web no later than midnight on Friday, September 9, 2016. Remember that your submission must either contain a CodeBlocks or Visual Studio project file!

Solution Preview :

Prepared by a verified Expert
Programming Languages: Describe the most challenging aspect of the
Reference No:- TGS01582630

Now Priced at $50 (50% Discount)

Recommended (98%)

Rated (4.3/5)