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 00:50
Is one of the most injurious events that can happen to a person in a crash.
Answers: 1
question
Computers and Technology, 22.06.2019 11:40
Pthreads programming: create and terminate a thread write a c++ program that creates a thread. the main will display a message “hello world from the main”. the main will create a thread that will display a message “hello world from the thread” and then terminates with a call to pthread_exit()
Answers: 3
question
Computers and Technology, 23.06.2019 09:00
Which company provides a crowdsourcing platform for corporate research and development? a: mtruk b: wiki answers c: mediawiki d: innocentive
Answers: 2
question
Computers and Technology, 23.06.2019 17:00
In which of the following ways can using test-taking tips you? a. you can focus on the information that you need to study. b. you will see the answers to the test. c. you will study more. d. you will be less organized.
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, 18.05.2021 21:10
question
Mathematics, 18.05.2021 21:10
Questions on the website: 13722359