AppletStart, with a single button to click, will appear below in a Java enabled browser.
You may need to click twice to get the application to start.
Be sure to "allow blocked content" if your browser objects to the applet
loading.
The main frame may take a while to load.
Attempting to decompile the demo code is an Honor Code violation!
Clicking on the "Admit Patient" button will place an insane patient into TAMU. The patients currently in TAMU are shown with their ID numbers and their sane/insane state, which will dynamically and autonomously change.
Patients will randomly (2% probability) become sane and then randomly, but with much higher probability (20%), become insane again.
Clicking on the "Release Patient" button will remove one sane patient from TAMU and display that patient's id and sanity on the bottom text label.
It is not defined as to which sane patient is removed when multiple sane patients exist.
Only sane patients can be released from TAMU.
If no sane patients exist in TAMU, clicking on the "Release Patient" button will simply display a message on the bottom text label saying that there were no sane patients in the TAMU. This includes the case when the TAMU is empty.