Java program to demonstrate the publisher-subscriber software architecture, modeling a library system.