Answered step by step
Verified Expert Solution
Question
1 Approved Answer
enter _ sales _ for _ today: Takes as a parameter a dictionary where the keys are names of items sold and the corresponding values
entersalesfortoday:
Takes as a parameter a dictionary where the keys are names of items sold and the corresponding values are how many of the item were sold see the example at the end of the readme
If an item in the menu doesn't appear in the dictionary, then there were no sales of that item on that day. You don't need to worry about this in this method, but it's important in the next method.
If the name of any item sold doesn't match the name of any MenuItem in the dictionary of MenuItem objects, this method should do nothing except raise an InvalidSalesItemError youll need to define this exception class
Otherwise, it should create a new SalesForDay object using the current day and the dictionary that was passed in add that object to the list of SalesForDay objects, and then increment the current day by
Any time this method is called and the exception isn't raised exactly one SalesForDay object should be created and added to the list
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started