Question: Ships arrive at a port and drop anchor in an area just outside the port entrance. SOLVED

Question: Ships arrive at a port and drop anchor in an area just outside the port entrance. SOLVED

Ships arrive at a port and drop anchor in an area just outside the port entrance. This area is known as an anchorage. The ships wait at the anchorage until they are given a berth dispatch assignment, which includes the time at which a ship can leave the anchorage and enter the port. Each ship has a priority assigned to it based upon the type of cargo it is carrying. Priority values are integers and range from 0 to 10, with 10 corresponding to the highest priority. If ships have the same priority, then the ship with the earliest arrival time is dispatched to a berth first.

Assume you had to write an application that simulated the arrival and dispatch of ships at a port according to the above criteria. How would you model the anchorage and implement the dispatching rules? You must describe all the key classes that would be used in your solution
Powered by