Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

need help with this in python Past due date. Further activity completion will not count towards this assignment. Entire class was due: 02/03/2020, 11:59 PM

need help with this in python image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
Past due date. Further activity completion will not count towards this assignment. Entire class was due: 02/03/2020, 11:59 PM 2.6 Program: Checkout System This assignment requires you to build a simple checkout system. The requirements are: (1) Build an Iter class with the following specifications: Attributes (2 pts) .item_name (string) . item price (float) . item quantity (int) (2) Add a default constructor to the item class. The constructor should Initialize the item's name 'Empty", item's price =0.0, item's quantity -0. (1 pt) (3) Add a method to Item called print_item_cost that prints the item name, the item quantity, the unit price and total price for this item. The prices should have two decimal points (1 pt) Example of the print_item_cost() output: Bottled water 10.00 @ $1 = $10.00 (4) Build a Checkout class with the following data attributes and related methods. (2 pts) Search (4) Build a Checkout class with the following data attributes and related methods. (2 pts) . Constructor which takes the customer name and date as parameters - Attributes customer_name (string) - Initialized in default constructor to "None" date (string) - Initialized in default constructor to January 1, 1970 cart_items (list) Methods . add_item Adds an item to cart_items list. Takes Item as a parameter. Does not return anything. remove_item > Removes item from cart_items list. Takes a string (an item's name) as a parameter. Does not return anything. If item name cannot be found output this message: Item not found. No changes. . modify_item Modifies an item's quantity. Takes two parameters, the name of the item to change and the new quantity. Does not return anything If item can be found (by name) in the list, modify item in cart If item cannot be found (by name) in cart, output this message: Item not found. No changes. (5) In the main section of your program, prompt the user for a customer's name and today's date. Create an object of type Checkout Also create a separate function call (not in the class) print_cart() that takes the Checkout instance as a parameter and prints the customers' name, the date, all the items in the class, and finally prints the total cost of all the items in the cart in Checkout (it will have no items at this point - but will in later tests) (2 pts) Example output for cart with no items: Enter customer's names search My library USUI 145 Intermediate Programming home > 26: Program: Checkout System zyBooks catalog Help/FAQ Nicho Example output for cart with no items: Enter customer's name: Chauncey c Enter today's date: March 3, 2020 CART: Customer name: Chauncey C Today's date: March 3, 2020 Total: $0.00 (6) In the main section of your code, output a menu of options to manipulate the shopping cart. Each option is represented by a single character. Build and output the menu within the function If the an invalid character is entered, continue to prompt for a valid choice Call print_menu() in the main) function Continue to execute call print_menu() until the user enters to Quit (3 pts) Example output Enter customer's name: Chauncey C Enter today's date: March 3, 2020 e to search DA 5 My lorary >USUT 145 Intermediate Programming nome > 20 irogram: Checkout System E zyBooks catalog Hep/FAQ 8 CART: Customer name: Chauncey C Today's date: March 3, 2020 Total: $0.00 MENU a - Add item to cart - Remove item from cart c - Change iter quantity q - Quit Choose an option: (7) Implement Add item to cart menu option (3 pts) Example of output Enter customer's name: Chauncey C Enter today's date: March 3, 2020 CART: here to search CART: Customer name: Chauncey C Today's date: March 3, 2020 MENU a - Add item to cart r - Remove item from cart C - Change item quantity 9 - Quit Choose an opti: a ADD ITEM TO CART Enter the item name: Running shoes Enter the price: 97 Enter the quantity: CART: Customer name: Chauncey C Today's date: March 3, 2020 Running Shoes 2 @ $97.00 = $194.00 Total: $194.00 Type here to search (8) Implement remove item menu option. (3 pts) Example of output: Enter customer's name: Chauncey c Enter today's date: March 3, 2020 CART: Customer name: Ichauncey c Today's date: March 3, 2020 Total: $0.00 MENU a - Add item to cart I - Remove item from cart C - Change item quantity q - Quit Choose an option: a ADD ITEM TO CART Enter the item name: Laptop O Type here to search Tugu UNGUNUL System EzyBook Laptop Enter the price: 499 Enter the quantity: CART: Customer name: Chauncey c Today's date: March 3, 2020 Laptop 1 @ $499.00 = $499.00 Total: $499.00 CeeceeeDOS MENU a - Add item to cart r - Remove item from cart C - Change item quantity q - Quit Choose an option: REMOVE ITEM FROM CART Enter name of item to remove: Laptop CART: Customer name: Chauncey c Type here to search Today's date: March 3, 2020 Total: $0.00 (9) Implement Change item quantity menu option. (3 pts) Example of output: Enter customer's name: Chauncey C D Enter today's date: March 3, 2020 CART: Customer name : Chauncey Today's date: March 3, 20 Total: $0.00 MENU a - Add item to cart - Remove item from cart C - Change item quantity 9 - Quit . O Type here to search GOOD CART: Customer name: Chauncey C Today's date: March 3, 2020 Total: $0.00 (9) Implement Change item quantity menu option. (3 pts) Example of output: Enter customer hot name: Chauncey C Enter today's date: March 3, 2020 CART: Customer name : Chauncey Today's date: March 3, 2020 Total: $0.00 MENU a - Add item to cart r - Remove item from cart C - Change item quantity 9 - Quit Type here to search O gue LU. PLyall Checkout System Choose an option: a ADD ITEM TO CART Enter the item name: Skateboard Enter the price: 109 Enter the quantity: A CART: Customer name : Chauncey C Today's date: March 3, 2020 Skateboard 1 @ $109.00 - $109.00 Total: $109.00 MENU a - Add item to cart r - Remove item from cart C - Change item quantity q - Quit Choose an option: CHANGE ITEM QUANTITY P O Type here to search q - Quit Choose an option: c CHANGE ITEM QUANTITY Enter the item name: Skateboard Enter the new quantity: CART: Customer name: Chauncey C Today's date: March 3, 2020 Skateboard 3 @ $109.00 = $327.00 Total: $327.00 TY 2.6.1: Program: Checkout System main.py

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Marketing The New Profit Frontier

Authors: Ed Burnett

1st Edition

0964535629, 978-0964535626

Students also viewed these Databases questions

Question

1. Write down two or three of your greatest strengths.

Answered: 1 week ago

Question

What roles have these individuals played in your life?

Answered: 1 week ago

Question

2. Write two or three of your greatest weaknesses.

Answered: 1 week ago