ProducerConsumer: Contains producer, consumer, and main. main starts two threads, producerThread and consumerThread which start the consumer and producer process.
producer: creates random double 'item' and checks if buffer size is equal to 1000, if it is, it waits for the consumer to consume one element. It adds the item to the buffer
increments the counter of total produced items and adds the value to the sum of the produced items.
consumer: removes the oldest value in the buffer, maintains a value of the sum of the consumed items.
main: makes two threads and joins them back together
The makefile compiles the files and then runs with 'make run'

This is my attempt at solving the producer consumer problem using bounded buffer in Java. There are two threads, one consumer that removes items from the buffer and 'consumes' them, and one producer that adds items to the buffer, thus 'producing them'. Adding to the buffer is an action that can easily cause issues if both threads try and change the values at the same time. The program uses a couple of methods to synchronize and manage common resources, such as waiting and notifying the updating common variables when one is operating on the buffer.