Sample Output: 1. First window: Start ordering will start the program. This will be a button,...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Sample Output: 1. First window: Start ordering will start the program. This will be a button, pressing the button will start the code and take user to the second window Start Ordering Grocery Cart 2. Second Window: User will be displayed with all the items available. For this assignment, we have three items only. Item information is saved in a given list self.items inside the _init__() file. The information to be displayed to the users are: name (checkbutton**), price (label), quantity(entry) and expiration date (label) as follows: Subtotal: 0.0 Grocery Cart egg $1.99 milk $2.99 salmon $4.99 12/12/2023 1/2/2024 12/10/2024 Add to Cart This window also contains subtotal label and an 'Add to Cart' button. ** Check button: are interactive buttons to select/unselect an item. When user presses the check button that means the item is being selected. Following is a sample code to create a check button. Details provided in the template file: How to create a checkbutton: var = IntVar() #associate an IntVar() with 0/1. c = Checkbutton(root, text="egg", variable=var) c.pack() By default, the variable is set to 1 if the button is selected, and 0 otherwise. variable=Associates a Tkinter variable to the check button. When the check button is pressed, the variable is toggled between 0 and 1. Method get() returns the current selection value. 3. Item selected and add to cart: Item and quantity selected and subtotal shown: Egg and salmon selected with user entering quantity of 2 and 2 respectively. After selection pressing 'Add to Cart' will display the cart subtotal label at the left. Grocery Cart egg $1.99 2 milk $2.99 salmon $4.99 2 Subtotal: 13.96 12/12/2023 1/2/2024 12/10/2024 Add to Cart Sample Output: 1. First window: Start ordering will start the program. This will be a button, pressing the button will start the code and take user to the second window Start Ordering Grocery Cart 2. Second Window: User will be displayed with all the items available. For this assignment, we have three items only. Item information is saved in a given list self.items inside the _init__() file. The information to be displayed to the users are: name (checkbutton**), price (label), quantity(entry) and expiration date (label) as follows: Subtotal: 0.0 Grocery Cart egg $1.99 milk $2.99 salmon $4.99 12/12/2023 1/2/2024 12/10/2024 Add to Cart This window also contains subtotal label and an 'Add to Cart' button. ** Check button: are interactive buttons to select/unselect an item. When user presses the check button that means the item is being selected. Following is a sample code to create a check button. Details provided in the template file: How to create a checkbutton: var = IntVar() #associate an IntVar() with 0/1. c = Checkbutton(root, text="egg", variable=var) c.pack() By default, the variable is set to 1 if the button is selected, and 0 otherwise. variable=Associates a Tkinter variable to the check button. When the check button is pressed, the variable is toggled between 0 and 1. Method get() returns the current selection value. 3. Item selected and add to cart: Item and quantity selected and subtotal shown: Egg and salmon selected with user entering quantity of 2 and 2 respectively. After selection pressing 'Add to Cart' will display the cart subtotal label at the left. Grocery Cart egg $1.99 2 milk $2.99 salmon $4.99 2 Subtotal: 13.96 12/12/2023 1/2/2024 12/10/2024 Add to Cart
Expert Answer:
Related Book For
Posted Date:
Students also viewed these programming questions
-
CANMNMM January of this year. (a) Each item will be held in a record. Describe all the data structures that must refer to these records to implement the required functionality. Describe all the...
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
The following two equations have a common solution of (1, 2, 3). Which equation would complete a system of three linear equations in three variables having solution set {(1, 2, 3)}? x+y+z=6 2x = y +...
-
Refer to the information given in Problem 35. A student is selected at random. a. Find P(L3 | T1) directly, using Table 4.17 and the f/N rule. Interpret the probability you obtain in terms of...
-
janine ( a single taxpayer ) has the following income tax related items in 2 0 2 3 : salary of $ 8 5 , 0 0 0 and for AGI deductions of $ 8 , 0 0 0 . Janine does not have any qualified business income...
-
Water is pumped from the large tank shown in Fig. P5.112. The head loss is known to be equal to \(4 V^{2} / 2 g\) and the pump head is \(h_{p}=20-4 Q^{2}\), where \(h_{p}\) is in \(\mathrm{ft}\) when...
-
Set up T accounts for Cash, Unearned Ticket Revenue, and Ticket Revenue. Post the following two transactions to the appropriate accounts, indicating each transaction by letter: (a) Sold 1,500 season...
-
Discuss three changes written into the Constitution in 1789 that changed the government from what it was under the ArticIes of Confederation?
-
Using the Public MACRO BITCOIN scorecard spreadsheet (linked in its associated masterclass lesson - Long Term 32), create a COPY of it and perform a complete analysis for the date 22/2/2022....
-
Find the absolute maximum and minimum valuesof f on theset D . f ( x , y ) = 4 x + 6 y - x 2 - y 2 + 2, D ={( x , y ) | 0
-
How do you change the value of an instance variable in an immutable class? A. Call the setter method. B. Remove the final modifier and set the instance variable directly. C. Create a new instance...
-
Which statement best describes this class? A. It can be serialized. B. It is well encapsulated. C. It is immutable. D. It is both well encapsulated and immutable. E. None of the above as the code...
-
Which of the following can cause an injection attack? (Choose two.) A. Access control B. Command line input C. Constants in the program D. Mutable code E. Serialization F. XML parsing.
-
You ask to borrow one of your friends recipe cards. Which statements about these cards, represented as Java policy file grants, are correct? (Choose two.) A. The policy syntax of the policy file is...
-
Fill in the blanks: ____________ means the state of an object cannot be changed, while _____________ means that it can. A. Encapsulation, factory method. B. Immutability, mutability C. Rigidity,...
-
What kind of decision model(s) do you use in personal decision-making? What do you think business use? Have you been involved in business-to-business marketing?
-
Splitting hairs, if you shine a beam of colored light to a friend above in a high tower, will the color of light your friend receives be the same color you send? Explain.
-
The elementary isomerization reaction A B is taking place on the walls of a cylindrical catalyst pore (see Figure P15-7B.) In one run, a catalyst poison P entered the reactor together with the...
-
What if you were asked to give an everyday example that demonstrates the principles discussed in this chapter? (Would sipping a teaspoon of Tabasco or other hot sauce be one?)
-
The following is an excerpt from The Morning News, Wilmington, Delaware (August 3, 1977): Investigators sift through the debris from blast in quest for the cause [that destroyed the new nitrous oxide...
-
(a) Show that the variancecovariance matrix of the disturbances in (9.1) is given by (9.2). (b) Show that the two nonzero block matrices in (9.2) can be written as in (9.3). (c) Show that...
-
Using the Harrison and Rubinfeld (1978) data published in Belsley, Kuh and Welsch (1980) and provided on the Springer website as Hedonic.xls, reproduce Table 9.1. Perform the Hausman test based on...
-
Using the Monte Carlo setup for the unbalanced one-way error component model considered by Baltagi and Chang (1994), compare the various estimators of the variance components and the regression...
Study smarter with the SolutionInn App