Show a class Sales object that represents the sales for a particular day, there is two data members: an integer for the number of days and a dictionary whose keys are the names of items sold and whose values are the numbers of those items sold that day The Sales methods are: * init method - takes two parameters (number of days, sales dictionary) and uses them to initialize the data members * get methods for each of the data members: get_day() and get_sales_dict()
Show a class Sales object that represents the sales for a particular day, there is two data members:
an integer for the number of days and a dictionary whose keys are the names of items sold and whose values are the numbers of those items sold that day
The Sales methods are:
* init method - takes two parameters (number of days, sales dictionary) and uses them to initialize the data members
* get methods for each of the data members: get_day() and get_sales_dict()

The required Sales class is as follows
class Sales:
def __init__(self, days, sales_dict):
self.days = days
self.sales_dict = sales_dict
def get_day(self):
return self.days
def get_sales_dict(self):
return self.sales_dict
Step by step
Solved in 2 steps with 1 images









