Question: Language: Python Program: Processing 3.0 The program Processing 3.0 is used to build and initialize. For the burgers and fries, it does not necessary need
Language: Python
Program: Processing 3.0

The program Processing 3.0 is used to build and initialize. For the burgers and fries, it does not necessary need to be images, a rect() shape with a fill() color can be used to represent the burger and fries. Burgers and fries should increase and decrease with the keyPressed() function. Burgers and fries should never be less than 1, and if burgers and fries start to fill up one line, a new line should be made automatically, without overlapping each other.
For this question, you will create a Processing program that visualizes placing a simple fast food order at a drive-thru restaurant. Our restaurant in this question serves only two items: hamburgers and fries. Your program should allow the user to select how many of each item they want and should update its canvas with pictures of the appropriate number of items. Your program should have the following specific behaviour: Use a 600 times 600 white canvas as the backdrop Initially the number of burgers and fries in the order are both O. Pressing the 'b' key increases the number of burgers in the order by 1: 'V' decreases it by 1. Make sure the number of burgers in the order cannot go negative. Pressing the "f" key increases the number of fries in the order by 1: "d" decreases it by 1. Again, no negatives. At all times, the program should visually display the order, i.e. there should be 1 hamburger on the screen for each hamburger in the order and similarly for the fries. You will need to use loops to do this. Start displaying the items in the order near the top-left corner of the canvas and fill up the canvas one row of items at a time. If a row fills up, start displaying the items on the next row and continue doing so as needed. If there are both burgers and fries in the order, the burgers should be displayed first. Begin displaying fries on a separate row from the burgers (even if the burgers don't entirely fill up a row: see example below) It is okay if the order gets so big that it starts going off the bottom of the canvas: you do not need to handle this case. Here is an example of what your program might look like: Your burgers and fries don't have to look exactly the same as in the sample, but a reasonable attempt at visual appeal should be made
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
