Question: I need the program in C++ 1. You operate several hot dog stands distributed throughout town. Definite a class named HotDogStand that has a member

 I need the program in C++ 1. You operate several hot
I need the program in C++

1. You operate several hot dog stands distributed throughout town. Definite a class named HotDogStand that has a member variable for the hot dog stand's ID number and a member variable for how many hot dogs the stand has sold that day. Create a constructor that allows a user of the class to initialize both values. Also create a method named "JustSold" that increments the number of hot dogs the stand has sold by one. The idea is that this method will be invoked each time the stand sells a hot dog so that we can track the total number of hot dogs sold by the stand. Add another method that returns the number of hot dogs sold. Finally, add a static variable that tracks the total number of hotdogs sold by all hot dog stands and a static method that returns the value in this variable. Write a main method to test your class with at least three hot dog stands that each sell a variety of hot dogs. Hint: Recall that static variables must be initialized outside of the class definition 0 (10 points)

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!