The goal of this assignment is to solve problems that involve flow of control with conditional statements. We would like to design an online menu-driven application that allows users to order (only) one item from each category of Grocery products from the Panther Store. There are three categories of Grocery products: Fruits, Vegetables and Beverages. The following lists each item within a category of Grocery products, along with its price. Panther Fruits $4.27 1. Fuji Apples (3 lb) 2. Watermelon (each) $7.88 3. Strawberries (16 oz) $2.42 Panther Vegetables $2.97 1. Red Cabbage (each) 2. Zucchini (each) $0.81 3. Beets (1 lb) $2.44 Panther Beverages 1. Apple Juice (64 fl oz) $2.88 $5.54 2. Orange Juice (64 fl oz) 3. Coconut Water (33.8 fl oz) $3.47 Initially, the program will prompt the user for a total budget. If the user ever exceeds that budget while ordering Grocery items, an error message will display and the item will not be added to the order. That way the program will make sure that the user stays within budget. https:/fit.instructure.com/courses/96352/assignments/5063907?module_item_id=10058145 1/4 2/28/22, 6:13 PM Assignment 1 Panther Vegetables are shipped at a flat rate of $2 regardless of the number of items, Panther Beverages similarly are shipped at $5.50 and Panther Fruits at $3.50. Shipping costs are considered outside the user's budget. The program will keep track of which products have been ordered, how many have been ordered, where they have been ordered from, how much the user has spent, and the user's balance. After ordering is complete, the program will print out an overall invoice. No invoice prints if the customer orders nothing. Hint: You should not need loops for this assignment
Types of Loop
Loops are the elements of programming in which a part of code is repeated a particular number of times. Loop executes the series of statements many times till the conditional statement becomes false.
Loops
Any task which is repeated more than one time is called a loop. Basically, loops can be divided into three types as while, do-while and for loop. There are so many programming languages like C, C++, JAVA, PYTHON, and many more where looping statements can be used for repetitive execution.
While Loop
Loop is a feature in the programming language. It helps us to execute a set of instructions regularly. The block of code executes until some conditions provided within that Loop are true.
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 14 images