Hi, I'm new to this forum and look forward to contributing. I am currently working on a project where I have to build a Java simulator which consists of three input lines of food, three processing machines and two packing machines. There are 2 processing machines dedicated to processing perishable foods and one dedicated to non-perishable. The packing machines can pack anything. I am currently developing the the machine classes, which cosists of a packMachine and a processMachine, which are both subclasses of machine, which can jam randomly with a probability of 0.001.
I am struggling to develop the Random function, along with making the machine objects interact with the food objects. I am wondering how to make them communicate when they are not hierarchally related to eachother.
I am new to Java, so just confused by the language-specific qualities. Any pointers or tips would be greatly appreciated.