Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

Multithreaded Port Shipment Simulator

A Java console application that simulates ships arriving at a port and being processed concurrently by multiple jetties. A generator creates ships of different sizes and cargo types, a bounded tunnel holds arriving ships, and each jetty handles one cargo type.

The project demonstrates Java, object-oriented programming, multithreading, ExecutorService, synchronized methods, wait()/notifyAll(), collections, and enums.

Build and run

Requires a JDK. From this directory:

New-Item -ItemType Directory -Force build | Out-Null
javac -d build src/shipment/Main.java src/shipment/Tunnel.java src/shipment/generator/*.java src/shipment/ship/*.java src/shipment/ship/types/*.java
java -cp build shipment.Main

The generator produces ten ships with a ten-second pause between arrivals. The program exits after all ships are processed.

Originally developed as part of a Java programming course and later cleaned up for publication.

Author: Radomyr Karpan

About

Multithreaded Java simulation of a port with ship generation, shared tunnel synchronization, and concurrent jetties.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages