/** * This is a driver class Driver which calls upon MorseCode to translate MorseCode to text and back. * A wiki i used to locate information: http://en.wikipedia.org/wiki/Morse_code * * @author Freeman Lo * @version 0.0.1 Build 1 Jan 28, 2014. * Limitations - HardCoded the morse code string in a method without having an user entering it in * Compile : javac Driver.java * : java Driver * */ import java.io.*; import java.util.*; import java.lang.*; public class Driver { public static void main(String [] args) throws IOException { Scanner scan = new Scanner(System.in); MorseCode mc = new MorseCode(); String mess; System.out.print("Enter Phrase: "); // i didnt realized numbers do exist in morse code mess = scan.nextLine(); mess = mess.trim(); mess = mess.toUpperCase(); mc.setName(mess); mc.setLength(mess.length()); mc.convertToMC(); //mc.convertToText(); } }