subject

Polymorphism with Stores - PYTHON The goal of this program is to create classes that represent to a certain degree different types of stores in real life and the information tracked and services provided by these stores. In order to accomplish this the following required classes have to be created:
I. Create a file called store. py which contains an abstract class called Store which is made up of the following:
Attributes/Properties
o Store name
o Store address
Store availability/status (open or closed)
o Sales tax percentage Functions/Functionality
o Constructor which provides the ability to pass and set the values for the various attributes
Getter and setters for all the attributes mentioned above is_store_open should return True if the store is open and False if the store is closed
Abstract function called: calculate_total_sales_tax
o Abstract function called calculate_total_sales
II. Create a file called restaurant. py which contains a class called Restaurant which is type of Store. It should possess all the attributes and functions present in the Store class without having to re-implement those in the Restaurant class.
The Restaurant class is made up of the following:
Attributes/Properties
o Total number of people served Max occupancy
o Current occupancy o Price per person Functions/Functionality
o Constructor which provides the ability to pass and set the values for the various attributes
seat_patrons should do the following: Take the number of people to be seated as input
Update the values of the appropriate attributes
If number of people to be seated does not exceed or equals the max occupancy
Print "Welcome to [replace with name of restaurant]"
• Return True If number of people to be seated exceeds the max occupancy
Print "We are at capacity, we appreciate your patience"
Return False
serve_patrons which should do the following:
Take the number of people to serve as input
Update the values of the appropriate attributes
Return the number of people being served currently
o checkout_patrons (this is when the patrons are ready to leave the restaurant) which should do the following:
Take the number of people leaving as input
Update the values of the appropriate attributes
Return the current occupancy of the restaurant
o Create a getter and setter for the attribute: Price per person
III. Create a file called grocery_store. py which contains a class called GroceryStore which is type of Store.
It should possess all the attributes and functions present in the Store class without having to re-implement those in the GroceryStore class.
The GroceryStore class is made up of the following:
Attributes/Properties
o Total revenue
Grocery store type (independent or chain)
Functions/Functionality
o Constructor which provides the ability to pass and set the values for the various attributes
sell_item which should do the following:
Takes the quantity and price of an item as input
Update the values of the appropriate attributes
Return the total revenue of the grocery store
o Create a getter and setter for the attribute: Grocery Store type
IV. Create a file called shopping. py which will make use of the above mentioned Restaurant and GroceryStore classes and call their various functions to simulate the actions which take place in real life restaurants and grocery stores in order to test your code.
Reminder: Do not forget to implement the two abstract functions specified in the Store class within each of the classes mentioned above

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 00:00
11. is the ability to understand how another person is feeling. a. authority b. sympathy c. empathy d. taking a stand
Answers: 1
question
Computers and Technology, 23.06.2019 02:00
As with any small island country, cuba has fewer natural resources than countries such as brazil. this affects their economy in that cuba a) exports only manufactured products. b) exports more products than it imports.. c) must import more products than it exports. d) has imposed trade barriers against the united states.
Answers: 3
question
Computers and Technology, 23.06.2019 02:50
There’s only one game mode that stars with the letter ‘e’ in cs: go. which of the options below is it?
Answers: 1
question
Computers and Technology, 23.06.2019 22:30
Lakendra finished working on her monthly report. in looking it over, she saw that it had large blocks of white space. what steps could lakendra take to reduce the amount of white space?
Answers: 3
You know the right answer?
Polymorphism with Stores - PYTHON The goal of this program is to create classes that represent to a...
Questions
question
Mathematics, 22.06.2019 16:00
Questions on the website: 13722360