Please do not use any other code on chegg it is not right. I need the entire in the separate classes code, not the design.


Design and Programming Project Ass?gnment 2 CSIS 3810 Introduction You must provide a methodology, design, and Java implementation for this assignment (see Coding Problem below). Submit your answers in a ZIP file. The submission will include Word or Text files and the Java source and class files. Each deliverable must be clearly labeled, including your name and course title. See the Deliverables section for details. Problem Description In the great electric-vehicle race there are six vehicles associated with a single vehicle refresh area. Each vehicle requires tires, charged battery, and a refreshment for the driver to run an arbitrary amount of time around the track. Thus, a vehicle will run around the track then will need to stop to replenish supplies. In this problem there are seven tasks: six vehicles (not quite identical, but three types) and a Supply Coordinator. Each of the vehicle tasks will stop to replenish supplies (receive new tires, battery, and refreshment for the driver) then run an arbitrary number of laps before they stop again for supplies. The items necessary to satisfy a replenishment stop are: the tires, battery, and refreshment for the driver. Each vehicle type possesses one of the three items in an infinite quantity within their private assembly area (IE. one type has tires, another batteries, and third has refreshments for the driver). Thus, of the six vehicles, there are two that have tires, two that have batteries, and two that have refreshments for the driver in an infinite supply in their private assembly area. The Supply Coordinator has an infinite supply of all three items necessary to complete a replenishment stop. At random, the Supply Coordinator places two different (of the three necessary) items on a table in the general replenishment area. The vehicles then must acquire the proper contents from the general replenishment area to replenish their vehicle and driver to then continue to run more laps (a vehicle must have all three items to complete a replenishment stop.) The Supply Coordinator then fills the general replenishment area with two different (of the three necessary) items (at random), and then the cycle continues. Each vehicle takes a variable time to complete the replenishment stop and run their next set of laps. Your job is to implement a Java solution that synchronizes the vehicles and the Supply Coordinator in the most efficient manner using semaphores such that a deadlock or indefinite postponement will not occur. Within the solution to this problem, you must use the semaphore primitives (acquire and release) to synchronize the vehicles and Supply Coordinator. The vehicle and Supply Coordinator code must not use any other
synchronization technique outside of the semaphore class primitives of acquire and release. In your implementation each vehicle, as well as the Supply Coordinator, are required to run as separate threads. The Supply Coordinator must use the Random class from java.util to create a seeded random number sequence. Your program must accept the seed value as an argument on the command line (java program seedvalue.) Include print statements that show the state of your system such that the events can be traced from the output. Use indentation, blank lines and specific labels to show your output in a clear and concise manner. The finished assignment must include the following (in a ZIP file that extracts as a single directory for this problem): - A detailed design - The Java Application Implementation - The Java Source Code - The Class files o The system must compile using the command: javac *.java - The system must run using the command: java program seedvalue, where seedvalue is an integer of type long.