This will give you a solution to the famous concurrent problem - "Senate Bus Problem". It will also simulate creating random number of buses and riders.
This program contains 4 java files; 1. SenateBusProblem.java 2. Bus.java 3. Rider.java 4. SimulationClass.java
- Compile the program by typing "javac *.java" command in command line in the folder where the java files exist
- Run Simulator by "java SimulationClass"