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
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