subject

Grub by Air has accepted you bid to develop the App for them and has contracted with your company to develop then next class in the project This program extends the earlier "Grub by Air" program you developed in assignment 9.16. Copy your itemToPurchase class from your earlier program. In addition, portions of your code from the main section of 9.16 can be moved into this assignment. (1) Build an Order class with the following data attributes and related methods. Note Methods remove_item(), modify_item(), and place_order() can be method stubs (empty methods - use pass), to be completed in later steps . Parameterized constructor which takes the customer name and a date as parameters • Attributes customer_name (string) - Initialized in constructor using parameter with default 'none o order_date (string) - Initialized in constructor using parameter with default of January 1, 2020 . items_to_purchase (list) - Initialized in the constructor to an empty list, does NOT use a parameter • Methods o add_item(item, quantity) • Creates and adds an Item To Purchase to items_to_purchase list. Has parameter Item and quantity. Does not return anything o remove_item(index) Removes item from tems_to_purchase list. Has an index parameter. Does not return anything, o modify_item(index, quantity) . Modifies the quantity of an ItemToPurchase. Has parameter index and quantity. Does not return anything o get_num_items() . Returns quantity of all items in tems to purchase list. Has no parameters get_total_costo • Determines and returns the total cost of all items in the order. Has no parameters o print_ordero • Outputs the complete order as shown in the example below. . If number of items is zero then print "ORDER IS EMPTY o place_ordero . print_order) . Outputs the complete order as shown in the example below. • If number of items is zero then print "ORDER IS EMPTY place_ordero .Write the output to a file using result of this f string as the name PORDER (self. customer_name) (self. order_date)

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 16:10
Drag each label to the correct location on the imagelist the do’s and don’ts of safeguarding your password.keep yourself loggedin when you leave your computer.don’t write your password down and leave it whereothers can find it.share your password with your friends.each time you visit a website,retain the cookies on your computer.use a long password with mixed characters.
Answers: 1
question
Computers and Technology, 24.06.2019 09:00
Technician a says that a new replacement part is always good. technician b says that sometimes recent repair work will be the cause of a complaint. who is correct? a. both technicians a and b b. technician a c. technician b d. neither technician a nor b
Answers: 3
question
Computers and Technology, 24.06.2019 13:30
Consider jasper’s balance sheet. which shows how to calculate jasper’s net worth?
Answers: 1
question
Computers and Technology, 24.06.2019 16:50
7.23 main lab 7 - online shopping cart background this main lab extends the earlier prep lab "online shopping cart part 1". (you should save this as a separate project from the earlier prep lab). you will create an on-line shopping cart like you might use for your on-line purchases. the goal is to become comfortable with setting up classes and using objects. requirements this lab can be done individually or as pair programming. expanded itemtopurchase class (15 points) extend the itemtopurchase class as follows. we will not do unit testing in this lab so we will not be giving you the names of the member functions. create good ones on your own. create a parameterized constructor to assign item name, item description, item price, and item quantity (default values of "none" for name and description, and 0 for price and quantity). additional public member functions set an item description get an item description print the cost of an item - outputs the item name followed by the quantity, price, and subtotal (see example) print the description of an item - outputs the item name and description (see example) additional private data members a string for the description of the item. example output of the function which prints the cost of an item: bottled water 10 @ $1.50 = $15.00 example output of the function which prints the item description:
Answers: 1
You know the right answer?
Grub by Air has accepted you bid to develop the App for them and has contracted with your company to...
Questions
question
Mathematics, 22.04.2020 22:19
Questions on the website: 13722363