This is just an uni assignment and should not be taken seriously
File Structure
src/main/- Main application entry points
items/- Product class definitions
containers/- Container type implementations
methods/- Calculation and business logic
LICENSE- Project license
README.md- Project documentation
Getting Started
Prerequisites
- Java Development Kit (JDK) 17 or higher
- Any Java IDE (Eclipse, IntelliJ IDEA, etc.)
Running the Application
-
Clone the repository:
git clone https://codeberg.org/omerdduran/ShippingCompHW.git cd ShippingCompHW -
Compile the Java files:
javac main/*.java items/*.java containers/*.java methods/*.java -
Run the main application:
java main.Main
Running the Tests
The project includes a test suite with predefined scenarios:
java main.Test
Available test scenarios:
- Fill a large container completely
- Fill a small container (weight ≤ 500 kg)
- Fill a small container (weight > 500 kg)
- Mixed items scenario
Features in Detail
Container Types
- Small Container
- Custom volume capacity
- Weight-based pricing (≤500kg: 1000€, >500kg: 1200€)
- Big Container
- Larger volume capacity
- Fixed price: 1800€
Supported Products
- Laptop
- Mouse
- Desktop
- LCD Screen
Each product has predefined:
- Dimensions (length, width, height)
- Weight
- Volume calculation
Calculations
- Total volume calculation
- Total weight calculation
- Optimal container selection
- Cost optimization for different container combinations