logo Use CA10RAM to get 10%* Discount.
Order Nowlogo
(5/5)

take orders for multiple shopping carts for each category, display a submenu of specific items after that category is selected

INSTRUCTIONS TO CANDIDATES
ANSWER ALL QUESTIONS
  1. take orders for multiple shopping carts

…for each category, display a submenu of specific items after that category is selected

  1. the submenu includes a specific named item and its price
  2. collect and validate the item selection number, flag an invalid selection
  3. keep a list of each category’s specific item cost – use a list (or tuple or dictionary) to translate the selected item’s menu number into a price (see below for the named items and prices)
  4. accumulate the number of category items and category costs selected – the quantity of each selection is one, but repeated selections may be made by selecting them again from the menu 6. redisplay the item menu until ‘x’ is selected, at which point the category menu is selected
  5. redisplay the main category menu and continue processing until ‘c’ (checkout) is selected from the category menu
  6. print the checkout summary– the format should display dollars and cents using the print formatting statements shown in class
  7. ask whether more carts are to be processed
  8. continue until no more carts are desired by the user
  9. print a session summary that includes total number of carts, items, and cost of all carts processed

 

The category menu will display one of four choices :

The following submenu will be displayed for the Books selection when category ‘1’ is selected:

 

Extra clarification:

The user enters a selection and the program validates it is one of the above (1 through 3 or ‘x’). If 1, 2, or 3, the program adds the selected item and price to the totals for that category. Selecting an item adds one item to the cart (which should be implemented as a list) and one price, so your program represents the cart as a list of lists. The sublists are [, price], e.g., [“Grant”, 24.95]. If two of the same items are desired they must be selected twice and recorded twice in the cart. If ‘x’ is selected, the category menu is redisplayed. Otherwise the same item submenu is redisplayed.

The menu is displayed for more selections until the user selects ‘c’ (checkout). When checkout is selected the program iterates through the cart (list) and prints a report showing each item in the cart, its price, the total number of items in the cart, and the total price of all items in the cart. The item description, count, and price formatting be of good quality: no ragged columns and dollars and cents displayed using two digits to the right of the decimal point.

The program then asks if there are more carts to process and, if yes, repeats the above. If not, the totals for all carts and all item counts and costs is printed.

(5/5)
Attachments:

Expert's Answer

642 Times Downloaded

Related Questions

. Introgramming & Unix Fall 2018, CRN 44882, Oakland University Homework Assignment 6 - Using Arrays and Functions in C

DescriptionIn this final assignment, the students will demonstrate their ability to apply two ma

. The standard path finding involves finding the (shortest) path from an origin to a destination, typically on a map. This is an

Path finding involves finding a path from A to B. Typically we want the path to have certain properties,such as being the shortest or to avoid going t

. Develop a program to emulate a purchase transaction at a retail store. This program will have two classes, a LineItem class and a Transaction class. The LineItem class will represent an individual

Develop a program to emulate a purchase transaction at a retail store. Thisprogram will have two classes, a LineItem class and a Transaction class. Th

. SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of Sea Ports. Here are the classes and their instance variables we wish to define:

1 Project 1 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of

. Project 2 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of Sea Ports. Here are the classes and their instance variables we wish to define:

1 Project 2 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of

642 Times Downloaded

Ask This Question To Be Solved By Our ExpertsGet A+ Grade Solution Guaranteed

expert
Um e HaniScience

606 Answers

Hire Me
expert
Muhammad Ali HaiderFinance

711 Answers

Hire Me
expert
Husnain SaeedComputer science

602 Answers

Hire Me
expert
Atharva PatilComputer science

940 Answers

Hire Me