Question: Description: Develop a comprehensive C program to manage a shopping cart. Each item in the shopping cart should have the following: Name ( string )
Description:Develop a comprehensive C program to manage a shopping cart. Each item in the shopping cart should have the following: Name string Quantity integer and Price float The program should prompt the user to select an option from the menu to perform the following tasks:Add an item to the cartUpdate item information name quantity, pricePrint the list of items in the cart, including the total number of items and the total sum of prices of all itemsPrint the highest and lowest price item informationExit the programDefine a function for each of the following tasks:Add Item: Adds a new item to the cart.Update Item: Updates the information of an existing item in the cart.Print Cart: Prints the list of items in the cart along with the total number of items and the total sum of their prices.Print Highest and Lowest Items: Prints the information of the items with the highest and lowest prices.In the main function, use a loop to display the menu and handle the user's choice input. Ensure that the user can perform multiple operations until they choose to exit the program.Objective: This assignment covers fundamental concepts in C programming, including arrays, loops, conditionals, and user input, providing a comprehensive exercise for students.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
