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, 23.06.2019 09:30
[java] create an application called registrar that has the following classes: a. a student class that minimally stores the following data fields for a student: - name - student id number - number of credits - total grade points earned and this class should also be provides the following methods: - a constructor that initializes the name and id fields - a method that returns the student name field - a method that returns the student id field - methods to set and retrieve the total number of credits - methods to set and retrieve the total number of grade points earned. - a method that returns the gpa (grade points divided by credits) b. an instructor class that minimally stores the following data fields for an instructor: - name - faculty id number - department the following methods should be provided: - a constructor that initializes the name and id fields - methods to set and retrieve the instructor’s department. c. a course class that minimally stores the following data for a course: - name of the course- course registration code- maximum number of 35 students- instructor- number of students- students registered in the course (an array)the following methods should also be provided: - a constructor that initializes the name, registration code, and maximum number of students- methods to set and retrieve the instructor- a method to search for a student in the course; the search should be based on an id number.- a method to add a student to the course. if the course is hill, then an exception with an appropriate message should be raised (try creating your own exception class for this). also, be sure that the student is not already registered in the course. the list of students should be in the order that they registered.- a method to remove a student from the course. if the student is not found, then an exception with an appropriate message should be raised (use the same exception class mentioned a method that will allow course objects to be output to a file using object serialization- a method that will allow course objects to be read in from a file created with object serializationyou will note that the student and instructor classes described above have some commonality. create aperson class that captures this commonality and uses it as a base class for student and instructor. this class should be responsible for the name and id fields and also provide atostring method that returns a string of the form name, id. this will be the inheritedtostring method for the student and instructor classes.1. draw a uml diagram for diss application.2. implement the previous classes in java. write a main program that can serve as a test class that tests all of the methods created and demonstrates that they are working
Answers: 2
question
Computers and Technology, 24.06.2019 14:00
In the microsoft® access® and microsoft excel® programs, the ribbon contains tabs that are divided into with like tools in them. parts groups containers bunches
Answers: 1
question
Computers and Technology, 24.06.2019 22:00
According to your study unit, what is the main reason that improved human relations skills may improve your grades?
Answers: 1
question
Computers and Technology, 25.06.2019 06:10
In your pest busters game, how does player 2 move the ship_2 object? a pressing the w and s keys b. pressing the up arrow and down arrow keys c. moving the mouse from side to side d. moving the mouse up and down select the best answer from the choices provided
Answers: 3
You know the right answer?
Python . you will be writing a (rather primitive) online store simulator. it will have three classes...
Questions
Questions on the website: 13722361