(Complete) A simple demonstration of Java and multi-threaded programming using competing deposit and withdrawal threads.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.idea
out
src
README.md
fake-bank.iml
fake-bank.jar
output_01.png
output_02.png
output_03.png
output_04.png
output_05.png
output_06.png
output_07.png

README.md

fake-bank

A simple demonstration of Java and multi-threaded programming using competing deposit and withdrawal threads.

Main focus of this application is to demonstrate rudimentary ability in multi-threaded programming, while practicing my Java skills.

User establishes the number of deposit and withdrawal threads they want in play, and the press the "start" button.

Threads compete for access to the single Account instance's balance. A semaphore allows only one thread at a time to access its critical section, thus ensuring only one thread is manipulating the balance at any given time.

Precautions were also taken to insure that a withdrawal thread cannot deduct money from the balance (even if it has acquired the semaphone) if there is insufficient funds. It's made to wait until a deposit threads adds a sufficient amount into the account.

This program uses FXML, Scene Builder 2.0, and implements a basic GUI for the user.

Screenshots were uploaded to demonstrate the program in its working form.