C++ program using OOP to write a program to create a shopping list.

Gowtham
2 min readJul 11, 2021

C++ program using OOP to write a program to create a shopping list. Implement operations like displaying the list, remove items from the shopping list and print the total value of the list.

Output the above program

The first function CNT() simply sets the variable count to zero. The second function getitem() gets the item code and the item price interactively and assigns them to the array members itemCode[count] and itemPrice[count].

Note that inside this function count is incremented after the assignment operation is over. The function displaysum() evaluates the total value of the order and then prints the value. The fourth function remove() deletes a given item from the list. It uses the item code to locate it in the list and sets the price to zero indicating that the item is not active in the list. Lastly, the function displayitems() displays all the items in the list.

The program implements all the tasks using a menu-based user interface.

--

--