Question: Please solve using c++ Imagine you operate several hot dog stands throughout town. Define a class called HotDogStand that has member variables for the hot
Please solve using c++
Imagine you operate several hot dog stands throughout town. Define a class called HotDogStand that has member variables for the hot dog stand's ID number and how many hot dogs the stand sold that day. Create a constructor that allows a user of the class to initialize both values. Also create a function named JustSold, which increments the number of hot dogs the stands has sold by one. This function will be invoked each time the stand sells a hot dog so that you can track the total number of hot dogs sold by the given stand. Also add a function that returns the number of hot dogs sold from this stand. Finally, add a static variable that tracks the total number of hot dogs sold by all hot dog stands and a static function that returns the value in this variable. In main(), test your class by creating 4 instances of the HotDogStand class for stands that sell PLAIN, KETCHUP, MUSTARD, and RELISH hot dogs. Prompt the user to enter how many hot dogs each stand sold. Then, print out the total number of hot dogs sold by all stands and how many hot dogs each individual stand sold.

THANK YOU
SAMPLE RUN #1: ./HotDogstand Interactive Session Hide Invisibles Highlight: None Show Highlighted Only Enter the number of hot.dogs sold.by-the.PLAIN HOT.DOG CART: 103 Bnter the number of hot.dogs sold.by the KETCHuP HOT.DOG CART: 89* Enter the umber of hot.dogs sold.by the MUSTARD HOT DOG. CART 152 Enter the number of hot dogs sold TOTAL . HOT-DOGS-SOLD: , 2 5 6 PLAIN: .103 KETCHUP: 89 MUSTARD: 52 RELISH: 12- .by.the RELISH HOT.DOG.CART: 12 SAMPLE RUN #1: ./HotDogstand Interactive Session Hide Invisibles Highlight: None Show Highlighted Only Enter the number of hot.dogs sold.by-the.PLAIN HOT.DOG CART: 103 Bnter the number of hot.dogs sold.by the KETCHuP HOT.DOG CART: 89* Enter the umber of hot.dogs sold.by the MUSTARD HOT DOG. CART 152 Enter the number of hot dogs sold TOTAL . HOT-DOGS-SOLD: , 2 5 6 PLAIN: .103 KETCHUP: 89 MUSTARD: 52 RELISH: 12- .by.the RELISH HOT.DOG.CART: 12
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
