This is the coursework implemented for MODULE: (2023) 6SENG006C.1 Concurrent Programming module.The Ticket Printing System simulates a scenario where passengers share a printer to print their tickets. The system involves multiple passengers and two technicians. One technician is responsible for refilling paper when it runs out, while the other technician replaces the toner cartridge when needed. This system is implemented using Java concurrency features, including threads, thread groups, and a monitor.
Develop Finite State Processes (FSP) to model the shared printer. The abstract FSP program will be the basis for the subsequent Java implementation. Ensure that the FSP processes accurately represent the interactions between passengers, the printer, and the two technicians.
Translate the FSP model into a multi-threaded Java program. Leverage appropriate Java concurrency features to implement the FSP processes and the complete system outlined in Part 1. Create Java classes representing passengers, the printer, and the two technicians. Ensure synchronization and coordination among threads to model the expected behavior of the Ticket Printing System.
- Java JDK 21
- LTSA Tool (for FSP modeling)
-
Clone the repository:
git clone https://github.com/JayanaGunaweera01/Concurrent-Ticket-Printing-system.git
-
Navigate to the project directory:
cd Concurrent-Ticket-Printing-system\src
-
Compile and run the Java program:
javac PrintingSystem.java java PrintingSystem