// TitanicNew.java (c) Kari Laitinen // http://www.naturalprogramming.com // 2004-10-06 Original file Titanic.java was created. // 2012-11-14 This program was made to use the newer ISODate class. // 2012-11-14 Last modification. // When this program is compiled, the file ISODate.java // must be in the same folder (directory) together with this file. class TitanicNew { public static void main( String[] not_in_use ) { ISODate date_when_titanic_sank = new ISODate( "1912-04-15" ) ; ISODate date_of_today = new ISODate() ; int[] time_from_sinking = new int[ 3 ] ; date_of_today.get_distance_to( date_when_titanic_sank, time_from_sinking ) ; System.out.print( "\n Today it is " + date_of_today + ".\n On " + date_when_titanic_sank + ", the famous ship \"Titanic\" went to" + "\n the bottom of the Atlantic Ocean." + "\n That happened " + time_from_sinking[ 0 ] + " years, " + time_from_sinking[ 1 ] + " months, and " + time_from_sinking[ 2 ] + " days ago. \n\n" ) ; } }