Question: Can you do this question in Python code that can be run in Onlinegdb Site? You operate several BurgerStands distributed throughout town. Define a class

Can you do this question in Python code that can be run in Onlinegdb Site?

You operate several BurgerStands distributed throughout town. Define a class named BurgerStand that has a member variable for the burger stand's id number and member variable for how many burgers that stand sold that day.

a) create a constructor that allows user of the class to initialize values for id number and for how many burgers sold that day and a destructor

b) create a function named justsold that show increments of the number of burgers the stand has sold by one. (This function will invoked each time the stand sells a burger so that you can track the total number of burgers sold by the stand. And returns the number of burgers sold.)

c) create a function that calculate the total number of burgers sold by all stands.

d) write in a data file, the list of burger stands and the total number of burgers sold by all stands.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!