Denzel Washington as Frank Barnes saving the day in Unstoppable
techred home > > transportation simulation

Transportation Safety Simulator with Inheritance


The goal of this program is to simulate the safety risks involved in transporting passengers (and perhaps cargo) via different mixes of transport modes from a source to a destination using Java's inheritance facilities.

Target completion date: Tuesday, 6-APR'21 at morning light

wb_incandescentProgram specs


Learn and demonstrate the principles of Java's inheritance facilities: super/sub classes and interfaces by building a transportation simulation tool

program requirement 1: transport mode inheritance family

Build on the transportation family we built in class by adding an addition 2-3 modes of transportation which are modeled by subclasses of TransportVehicle

Assemble an accurate UML class diagram which depicts how your classes are related within the transportation family. This could be handwritten, and photographed, or created in a digital tool like any drawing program such as in google drive.

requirement 2: safety risk model

Your simulator should use a random number generator, probably the java.util.Random class, to determine how many passengers are injured and how many are killed during movement from a source to a distination. The outcome of a given leg of transportation should be based somehow on a relative safety risk of any given transportation mode, as defined by the superclass TransportVehicle.

Explore some real transport stats compiled by the US National Transportation Safety Board (NTSB) and the Bureau of Transportation Statistics

requirement 3: simulator

Create a class called TransportationSimulator which you'll instantiate in the main method of your controller class. This object must implement the TransportSimulatable interface provided by Eric. This interface specifies that a our simulator needs to do at minimum a few key tasks: 1: run a transportation simulation and 2: provide simulation metrics resulting from the most recent call to runTransportSimulation().

requirment 4: sharing

Comments: Comment ALL OF YOUR METHODS in your classes using javadoc style comments (which you create by typing /** on the first line before a method and pressing enter to auto-complete the rest of the javadoc.

README: Also create a file written in markdown in the git repository housing your code that describes your tool and how it works. Include screen shots of your program running.

push to repoPush your code to a public facing git repository and include a link to your source directory in our master class tracker on the sheet named "TransportSimulator".