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

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

 

Kathleen has 15 yrs. of experience analyzing business IT needs and engineering solutions in payments, electric utilities, pharmaceutical, financial, virtual reality, and internet industries with a variety of technologies. Kathleen's project experience has been diverse ranging from executing the business analysis “design phase” to hands-on development, implementation, and testing of the IT solutions. Kathleen and her husband reside in Indiana with no children, instead living along with their fur babies.