The Shopping List

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 he 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 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

Main Application Window

Data Entry Validation

Data Entry Validation

Adding Items to the Shopping List

Adding Items to the Shopping List

changing an item on the list

changing an item on the list

User Validation on Deleting Without Selecting and Item

User Validation on Deleting Without Selecting and 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.