Bug 832

Summary: Program crashes when using AE system with 0 doctor.
Product: Hospital System Reporter: hongjlee2-c
Component: AE SystemAssignee: klhwong3-c
Status: CONFIRMED ---    
Severity: critical    
Priority: High    
Version: Alpha Release   
Hardware: PC   
OS: Windows   
URL: N/A

Description hongjlee2-c 2023-12-10 00:59:37 HKT
Step To Reproduce:
1. Login.
2. Make sure to have no AE doctor. (You will have no AE doctor by default) 
3. Input “2” to enter the AE system.
4. Input “1” to get a ticket and input any illness (e.g. “fever”)

Actual Results:
The program prints out crashes with an ArithmeticException exception.

Expected Results:
The program should not crash and give the ticket.

Suggested Fix:
We should have the list of doctors in AE.java. Add a condition to check whether this list is empty or not.