The Shopping List
My Student Project: C# for Beginners: Assignment #5 (Series)
Permission to publish my code submitted for the project assignment was granted by the professor.
This is a very simple windows form application that I completed for a class assignment. It is shown here to illustrate my coding style, structure, and commenting. This example is considered Level 1 – Easy.
Objectives
The main objectives are:
• To try some new common Windows Forms controls.
• To learn to use the List<T> collection for storing a list of objects.
• To exercise with Properties, constructors, and chain-calling of constructors.
Description
Write a Windows Form Application that saves a list of items.
Every item has the following data:
- Description
- Amount
- Unit
An example: “Buy milk 2 gallons”. “Buy milk” is saved as description, 2 as amount and gallons as the unit.
The basic requirement is that GUI should allow the user to add a new item, but for a grade A, the user should also be able to change or delete an existing item. The GUI should also present a list of all items saved in the registry. The list is to be updated after every change in the registry.
Demos
![Main Application Window](https://i0.wp.com/portfolio.katiegirl.net/CSharp/Windows%20Form%20Applications/TheShoppingList/demo/demo1.jpg?resize=419%2C318)
Main Application Window
![Data Entry Validation](https://i0.wp.com/portfolio.katiegirl.net/CSharp/Windows%20Form%20Applications/TheShoppingList/demo/demo2.jpg?resize=372%2C282)
Data Entry Validation
![Adding Items to the Shopping List](https://i0.wp.com/portfolio.katiegirl.net/CSharp/Windows%20Form%20Applications/TheShoppingList/demo/demo3.jpg?resize=390%2C296)
Adding Items to the Shopping List
![changing an item on the list](https://i0.wp.com/portfolio.katiegirl.net/CSharp/Windows%20Form%20Applications/TheShoppingList/demo/demo4.jpg?resize=335%2C253)
changing an item on the list
![User Validation on Deleting Without Selecting and Item](https://i0.wp.com/portfolio.katiegirl.net/CSharp/Windows%20Form%20Applications/TheShoppingList/demo/demo5.jpg?resize=379%2C285)
User Validation on Deleting Without Selecting an Item
My Solution Code
You can view and download the GitHub repository here.
You can also download a zip archive of the project code here.