Computers and Technology
Computers and Technology, 24.01.2020 23:31, mantooth

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.

answer
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 06:30, arguellesjavier15
Who can provide you with a new password when you have forgotten your old one? your provide you with a new password in case you forget your old one.
Answers: 3
image
Computers and Technology, 23.06.2019 16:00, cravens511peeelg
An english teacher would like to divide 8 boys and 10 girls into groups, each with the same combination of boys and girls and nobody left out. what is the greatest number of groups that can be formed?
Answers: 2
image
Computers and Technology, 24.06.2019 08:30, daskatingpanda
Formatting rows and columns is similar to cell formatting. in an openoffice calc spreadsheet, you can format data entered into rows and columns with the of the rows and columns options. you can insert rows and columns into, or delete rows and columns from, a spreadsheet. use the insert or delete rows and columns option on the insert tab. alternatively, select the row or column where you want new rows or columns to appear, right-click, and select insert only row or only column options. you can hide or show rows and columns in a spreadsheet. use the hide or show option on the format tab. for example, to hide a row, first select the row, then choose the insert tab, then select the row option, and then select hide. alternatively, you can select the row or columns, right-click, and select the hide or show option. you can adjust the height of rows and width of columns. select row and then select the height option on the format tab. similarly, select column, then select the width option on the format tab. alternatively, you can hold the mouse on the row and column divider, and drag the double arrow to the position. you can also use the autofit option on the table tab to resize rows and columns.
Answers: 1
image
Computers and Technology, 24.06.2019 14:30, ari313
Two students are discussing the flow of electricity. student a says that voltage is a measure of the amount of electron flow in a circuit. student b says that power is the product of voltage and current. which of the following statements is correct? a. only student a is correct b. only student b is correct c. both of the two students are correct d. neither of the two students is correct
Answers: 1
Do you know the correct answer?
Python . you will be writing a (rather primitive) online store simulator. it will have three classes...

Questions in other subjects:

Konu
Social Studies, 07.08.2021 20:50