Question: Please include comments so I can understand whats being done, thanks! Create a class with a main method for this program. At minimum, declare appropriate

 Please include comments so I can understand whats being done, thanks!
Create a class with a main method for this program. At minimum,
Please include comments so I can understand whats being done, thanks!

Create a class with a main method for this program. At minimum, declare appropriate constants for the amount per each type of package, variables to keep up with number of packages purchased, number of franks in a package left and buns in a package left. Run your simulation by assuming you start with one package of franks and one package of buns. Use a loop to drive the simulation. Each iteration of the loop represents the use of one frank and one bun. Design the control of your loop to end when you have run out of buns and franks at the same time. In your loop if you run out of one before the other simulate purchase

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!