Logistics Workflow Example

This program models logistics workflow.

Problem Statement

Write a Java program to model Shipment and LogisticsWorkflow classes.

Source Code

1 class Shipment {
2 String item; String destination;
3 Shipment(String i,String d){ item=i; destination=d; }
4 }
5 class LogisticsWorkflow {
6 void process(Shipment s){ System.out.println("Shipment of "+s.item+" to "+s.destination+" processed"); }
7 }
8 public class LogisticsWorkflowExample {
9 public static void main(String[] args) {
10 System.out.println("Eduinq Logistics Workflow");
11 Shipment s=new Shipment("Books","Delhi");
12 LogisticsWorkflow lw=new LogisticsWorkflow();
13 lw.process(s);
14 }
15 }

Program Output

Eduinq Logistics Workflow
Shipment of Books to Delhi processed

Explanation

Shipment models item and destination. - LogisticsWorkflow processes shipment. - This demonstrates enterprise logistics workflow modeling. Conclusion: Shows logistics workflow example.

Quick Links to Explore