Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

File Link: https://drive.google.com/file/d/1zHQ5rUXPM6hHw_2n1KabI3qBhNPZ4-uJ/view?usp=sharing Project This project will demonstrate a simulation of a dockyard. The dockyard regularly has ships arriving with many containers that are offloaded

File Link:

https://drive.google.com/file/d/1zHQ5rUXPM6hHw_2n1KabI3qBhNPZ4-uJ/view?usp=sharing

image text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribed
Project This project will demonstrate a simulation of a dockyard. The dockyard regularly has ships arriving with many containers that are offloaded into the dockyard and stored in an area of the dockyard for later pickup. As each ship arrives, it has a manifest which lists all the containers and the destination city for each container. You need to offload the containers and store them in a staging location within the dockyard by destination city. You should notice that as ships arrive these staging areas start getting filled up with containers. At any point, trucks can arrive to pick up a single container. The dockyard will load a container onto a truck based on the destination city of the truck. The dockyard will use the truck's destination city to get the next container in the queue for that destination city and place it on the truck for deliver. As more and more trucks arrive, you should notice that the staging areas for the truck destination cities become freed up since the containers are leaving the dockyard. The starting point for the project is uploaded to the class discussion area in blackboard. You will need to do the following: 1. There are interfaces defined for a container, a ship, and a truck in the shipping package that you will need to write implementation classes for. The implementation details are up to you as long as you implement the methods to satisfy the expected inputs and outputs. 2. There is an interface defined for the dockyard that you will need to write a class for. The dockyard needs to be able to store containers in different staging areas by destination city. 3. You will need to complete the implementation for the ShippingProcessor class. There is a base class the provides default implementations the ShippingProcessor should leverage. 4. Implement any custom exceptions you think are appropriate. 5. All of the code you need to implement should be created in a package named solution. We will discuss approaches in class. NOTE: You are not to change any interfaces or code within the shipping package. Sample output based on the input files provided: The dockyard contains 0 containers. A new ship has arrived. Processing... Before unloading: Ship S123 has 6 containers.\fHVC: 3 ATL: 4 A new truck has arrived. Processing... Before loading: Truck T111 is headed to LA with no container. After loading: Truck T111 is headed to LA with container E115 The dockvard contains 5 containers. LA: 1 EDS: 1 HVC: 3 AIL: 4 A new truck has arrived. Processing... Before loading: Truck T11E is headed to EDS with no container. After loading: Truck T11E is headed to EDS with container ESSE The dockvard contains E containers. LA: 1 EDS: E HVC: 3 ATL: 4 A new truck has arrived. Processing... Before loading: Truck T119 is headed to LA with no container. After loading: Truck T119 is headed to LA with container E515 The dockvard contains 1 containers. LA: E EDS: E HVC: 3 ATL: 4 A new truck has arrived. Processing... Before loading: Truck T13E is headed to EDS with no container. After loading: Truck T13E is headed to EDS with no container. The dockvard contains 1 containers. LA: E EDS: E HVC: 3 ATL: 4 A new truck has arrived. Processing... Before loading: Truck T131 is headed to LA with no container. After loading: Truck T131 is headed to LA with no container. The dockvard contains 1 containers. LA: B EDS: B HVC: 3 ATL: 4 The dockvard contains 1 containers. LA: E After unloading: Ship S123 has 0 containers. The dockyard contains 6 containers. LA: 1 BOS: 1 NYC: 2 ATL : 2 A new ship has arrived. Processing. . . Before unloading: Ship S124 has 8 containers. After unloading: Ship S124 has 0 containers. The dockyard contains 14 containers. LA: 2 BOS: 4 NYC: 4 ATL : 4 A new truck has arrived. Processing. . . Before loading: Truck T223 is headed to BOS with no container. After loading: Truck T223 is headed to BOS with container C123 The dockyard contains 13 containers. LA: 2 BOS : 3 NYC : 4 ATL : 4 A new truck has arrived. Processing. .. Before loading: Truck T224 is headed to NYC with no container. After loading: Truck T224 is headed to NYC with container C124 The dockyard contains 12 containers. LA: 2 BOS : 3 NYC: 3 ATL : 4 A new truck has arrived. Processing. .. Before loading: Truck T225 is headed to BOS with no container. After loading: Truck T225 is headed to BOS with container C523 The dockyard contains 11 containers. LA: 2 BOS: 2 NYC: 3 ATL : 4 A new truck has arrived. Processing... Before loading: Truck T226 is headed to BOS with no container. After loading: Truck T226 is headed to BOS with container C529 The dockyard contains 10 containers. LA: 2 BOS: 1src (default package) D Shipping.java example1 Container.java Dockyard.java Ship.java ShippingProcessor.java D Truck.java shipping I Container.java IDockyard.java IShip.java ITruck.java Shipping ProcessorBase.java 5123-Manifest 5124-Manifest Shipping Events

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Programming questions