Question: Class: Container An intermodal container or shipping container is a standardized container design that can be used across different modes of transport, from ship to

Class: Container
An intermodal container or shipping container is a standardized container design that can be used across different modes of transport, from ship to rail to truck, without unloading and reloading their cargo. A container can come in two standard sizes: 1 TEU and 2 TEU. The container class should store information about the specifications of each container: size and cargo type.
Size - The size of the container: 1 TEU or 2 TEU
Cargo Type - The type of cargo being carried:
Frozen Food - FF
Consumer Goods - CG
Processed Goods - PG
Raw Materials - RM
Industrial Equipment - IE
Your container class must implement methods to get the size and cargo type:
get_size()-Returns the size of the container in TEU.
get_cargo_type()- Returns the type of cargo.
Class: Container Ship
A container ship is a type of cargo ship that carries all its cargo in truck-sized containers. A container ship's capacity is measured in twenty-foot equivalent units (TEU). Typically, a container ship's cargo is split between 20-foot (1-TEU) and 40-foot (2-TEU) containers. The constructor for your container ship class will take the following parameters as input:
Maximum Capacity - The maximum number cargo capacity of the container ship in TEUs.
Maximum Speed - The maximum speed the container ship can sail with no cargo in nautical miles per hour (knots)
Minimum Draft - The minimum depth of the container ship with no cargo in meters.
Maximum Draft - The maximum depth of the container ship with full cargo in meters.
Your container ship class should store a list of all the containers assigned to the cargo ship into an attribute called containers. The draft of the ship is dependent on the current cargo of the ship and its maximum capacity. The ship's draft increases linearly as its capacity increases up to its maximum capacity. The speed of the ship is dependent on its maximum speed and its current draft. The ship's speed decreases linearly as its draft increases up to its maximum draft. The minimum speed of the ship is 50% of its maximum speed when at its maximum draft.
The following attributes of the container ship class should be calculated from the list of containers:
 Class: Container An intermodal container or shipping container is a standardized

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related General Management Questions!