subject

Python . you will be writing a (rather primitive) online store simulator. it will have three classes: product, customer and store. all data members of each class should be marked as private and the classes should have any get or set methods that will be needed to access them. here are descriptions of methods for the three classes: product: a product object represents a product with an id code, title, description, price and quantity available. init method - takes as parameters five values with which to initialize the product's id_code, title, description, price, and quantity_available. get methods for each of the data members, named get_id_code, get_title, get_description, get_price, and get_quantity_availabledecrease_quan tity - decreases the quantity available by onecustomer: a customer object represents a customer with a name and account id. customers must be members of the store to make a purchase. premium members get free shipping. init method - takes as parameters three values with which to initialize the customer's name, account_id, and whether the customer is a premium_member. you decide how to represent a customer's cartget methods named get_name and get_account_idis_premium_member - returns whether the customer is a premium memberadd_product_to_cart - adds the product id code to the customer's cartempty_cart - empties the customer's cartstore: a store object represents a store, which has some number of products in its inventory and some number of customers as members. you decide how to represent a store's inventory and membersinit method - whatever initialization needs to be done for your storeadd_product - adds a product to the inventoryadd_member - adds a customer to the membersget_product_from_id - returns the product with the matching id. if no matching id is found, it returns the special value noneget_member_from_id - returns the customer with the matching id. if no matching id is found, it returns the special value noneproduct_search - return a sorted list of id codes for every product whose title or description contains the search string. the first letter of the search string should be case-insensitive, i. e. a search for "wood" should match products that have "wood" in their title or description, and a search for "wood" should match products that have "wood" in their title or description. you may assume that the search string will consist of a single word.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 01:30
Someone wishes to run the software on another computer system that runs an operating system that does not support the software what can he do
Answers: 3
question
Computers and Technology, 22.06.2019 02:00
6. the is particularly susceptible to the effects of alcohol because it receives a large portion of total blood flow and has a high concentration of neurons. a. heart b. pancreas c. brain d. liver
Answers: 2
question
Computers and Technology, 23.06.2019 10:00
Install and use wireshark program ( send back screen shots and other vital information) case project 3-2: decode a tcp segment in a wireshark capture in this chapter, you walked through tcp segment to interpret the data included in its header. in this project, you use wireshark to capture your own http messafes, examine the tcp headers, and practice interpreting the data you'll find there. 1. open wireshark and snap the window to one side of your screen. open a browser and snap that window to the other side of your screen so you can see both windows.
Answers: 2
question
Computers and Technology, 24.06.2019 08:00
Arah has entered data about football players from team a and team b in a worksheet. she enters names of players from team a with details about each player in different columns of the worksheet. similarly, she enters details of all the players from team b. which option will her view the data for team a and team b in two separate sections after printing? a. page break view b. freeze pane view c. split screen view d. full screen view e. zoom out view
Answers: 1
You know the right answer?
Python . you will be writing a (rather primitive) online store simulator. it will have three classes...
Questions
question
Mathematics, 09.10.2019 10:30
question
Mathematics, 09.10.2019 10:30
Questions on the website: 13722363