Assignment #3
Due Monday, 3 October, 11:59 p.m.

Instructions

Do one of the following:

Problem: Late Evening Study Session

A group of computer science graduate students is studying late one evening at a professor's house. The students are drinking iced tea from a large pitcher that holds several glasses of tea. The professor, who had stayed up late the night before preparing another one of his brilliant lectures, is napping in a chair.

When a student wants to drink, he or she fills a glass from the pitcher, unless it is empty. If the pitcher is empty, the student waits until the professor wakes up and refills the pitcher. The behaviors of the students and the professor are specified by the following FSP processes:

    STUDENT   = (fillglass -> study -> STUDENT).
    PROFESSOR = (fillpitcher -> nap -> PROFESSOR).
    
    

Model the behavior of the PITCHER as an FSP process and then implement it as a Java monitor.