Please Help Complete Question Java 501 Operate Several Hot Dog Stands Distributed Througho Q43898724
**PLEASE HELP ME COMPLETE THIS QUESTION INJAVA**
5.01) You operate several hot dog stands distributed throughouttown. Define a class named HotDogStand that has an instancevariable for the hot dog stands ID number and an instance variablefor how many hot dogs the stand has sold that day.
Create a constructor that allows a user of the class to initializeboth values.
Also create a method named justSold that increments by one thenumber of hot dogs the stand has sold. The idea is that this methodwill be invoked each time the stand sells a hot dog so that you cantrack the total number of hot dogs sold by the stand. Add anothermethod 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 returnsthe value in this variable.
Write a main method to test your class with at least three hot dogstands that each sell a variety of HotDogs. Your main method shouldasks user to enter command. A command can be “sold”, which inresult would ask for cart number and increment its pointer. Anothercommand can be “print”, which will also asks for cart number andprint how many hotdogs that cart sold. One command would be”print-all”, that will result in printing how many HotDogs weresold by all carts. Call Static method of HotDogStand for”print-all”. Lastly, anything else will terminate the program.
**IT HAS TO FOLLOW THIS RESULT**:
Enter·commad:sold↵
Enter·Cart·Number:0↵
Enter·commad:sold↵
Enter·Cart·Number:1↵
Enter·commad:sold↵
Enter·Cart·Number:2↵
Enter·commad:print↵
Enter·Cart·Number:0↵
Cart·sold:·1Enter·commad:print↵
Enter·Cart·Number:1↵
Cart·sold:·1Enter·commad:print↵
Enter·Cart·Number:2↵
Cart·sold:·1Enter·commad:print-all↵
Total·sold:·3Enter·commad:exit↵
↵
THANK YOU IN ADVANCE
Expert Answer
Answer to **PLEASE HELP ME COMPLETE THIS QUESTION IN JAVA** 5.01) You operate several hot dog stands distributed throughout town. …
OR