https://github.com/florinamt/vinyl-lending-library_robot-simulated
Single user vinyl lending library simulated by 2 threads
https://github.com/florinamt/vinyl-lending-library_robot-simulated
java javafx mvvm-architecture observer-design-pattern state-design-pattern threads
Last synced: 3 months ago
JSON representation
Single user vinyl lending library simulated by 2 threads
- Host: GitHub
- URL: https://github.com/florinamt/vinyl-lending-library_robot-simulated
- Owner: FlorinaMt
- Created: 2024-03-27T09:25:16.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-09-03T06:01:22.000Z (9 months ago)
- Last Synced: 2025-01-12T16:20:53.809Z (5 months ago)
- Topics: java, javafx, mvvm-architecture, observer-design-pattern, state-design-pattern, threads
- Language: Java
- Homepage:
- Size: 7.6 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Use
A Vinyl has at least a title, artist, year, and a lending state. The Vinyl can be in different states depending on availability, reservation, borrowing or a combined borrowing and reservation.
You can borrow a Vinyl either if it is not reserved by someone else, is not already borrowed or if it is reserved by you (reserved).
You cannot reserve a Vinyl if it already contains a reservation (there is no reservation list, only one person at the time can reserve the Vinyl). However, you are allowed to reserve
A Vinyl if it is available (no reservation and not borrowed) or if it is borrowed and does not have another reservation.
A Vinyl can be removed from the library if it has no reservation and is not borrowed (available). If the Vinyl is borrowed, reserved or both, then the removal sets a flag such that the Vinyl cannot be reserved any longer.
The Vinyl is not fully removed until it has been returned and does not have a reservation (the person who may have reserved the Vinyl will still be able to borrow it, before it is finally removed)
A GUI with two windows displays a list of Vinyls including their states. Select one Vinyl and Reserve, Borrow or Return it. Remove a Vinyl (mark it to be removed until its state allows it to be fully removed).
Information that a Vinyl is about to be removed (before it is fully removed) is displayed. Two threads simulate “Bob” and “Wendy” reserving, borrowing and returning a Vinyl.### Requirements
- MVVM with at least two windows;
- the Observer design pattern;
- the State design pattern for the different states of a Vinyl;
- threads for the simulation and still be able to manually use the system (in the GUI)#### Class Diagram
#### State Machine Diagram
#### The application:


