Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

The agent should choose which pair of supplies to place out at random. The agent

ID: 3534003 • Letter: T

Question

The agent should choose which pair of supplies to place out at random. The agent periodically examines the table, and when it sees the ingredients have been taken, puts out a new random pair of ingredients.

Each smoker should periodically examine the table state for the desired ingredients, and remove them from the table when found.

Your program should generate a line of output each time a smoker changes state: starts smoking, stops smoking.

Terminate the threads and exit the program after the agent has enabled a total of 30 cigarettes to be smoked.

Explanation / Answer

//working code please rate


// the program is implemented using three files, smoker.cpp and smoker-main.cpp and smoker.h



Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote