This is a cinema ticketing system designed for both client and administrator use.
This system design uses the chain of responsibility pattern, the visitor pattern, the startegy pattern and the mediator pattern as follows:
The User class has two interfaces (strategies) to choose from when instantiated: admin or client. After having chose one of the two, the user instance visits the cinema instance and changes its state through the use of its chosen interface (strategy). If the user chose the client interface before visiting the cinema they will have access to getting a ticket and changing the state of the Reservation field inside of cinema. If the client chose the admin interface before visiting the cinema, they will be able to edit the cinema's state by adding or removing movies, showtimes, halls or viewings. This is possible because the cinema acts as mediator between the Showtime, Movie, Hall and Viewing classes. On visit time, this allows the user instance to change the cinema's state and fields through the interface (strategy) chosen on instatiation.The chain of responsability is used to compare Showtimes to one another and make sure they dont overlap before being added into the cinema's collection of showtimes. Please visit UML for further detail on design.
Application flow: The application starts off completely empty with no movies, showtimes, viewings or halls in the cinema. The admin must therefor login FIRST and add a movie, a showtime and a hall. He can then create a viewing based on those three objects. Without one of each of those objects, the admin won't be able to create a viewing and the clients won't be able to get tickets. After the admin has created a viewing, he can quit and re-enter as client. The client can then purchase a ticket by movie or by hall. After a couple users have bought tickets, you can sign back in as admin and look at all the reservations made.