// name, e-mail, purpose import java.util.*; public class PirateSpeak{ public static void main(String [] args){ // Create the hashtable object Hashtable myPirateDictionary = new Hashtable(); // fill the hashtable with words, hard-coded for now myPirateDictionary.put("hello","ahoy"); myPirateDictionary.put("pardon me","avast"); myPirateDictionary.put("excuse me","arrr"); myPirateDictionary.put("sir","matey"); myPirateDictionary.put("madam","proud beauty"); myPirateDictionary.put("miss","comely wench"); myPirateDictionary.put("stranger","scurvy dog"); myPirateDictionary.put("officer","foul blaggart"); myPirateDictionary.put("where is","whar be"); myPirateDictionary.put("can you help me find","know ye"); myPirateDictionary.put("is that","be that"); myPirateDictionary.put("how far is it to","how many leagues to"); myPirateDictionary.put("the","th'"); myPirateDictionary.put("a","a briny"); myPirateDictionary.put("any","some forsaken"); myPirateDictionary.put("nearby","broadside"); myPirateDictionary.put("my","me"); myPirateDictionary.put("your","ye"); myPirateDictionary.put("old","barnacle-covered"); myPirateDictionary.put("attractive","comely"); myPirateDictionary.put("happy","grog-filled"); myPirateDictionary.put("restaurant","galley"); myPirateDictionary.put("hotel","fleabag inn"); myPirateDictionary.put("mall","market"); myPirateDictionary.put("pub","Skull & Scuppers"); myPirateDictionary.put("bank","buried treasure"); myPirateDictionary.put("I would like to","I be needin' t'"); myPirateDictionary.put("I desire","I've a fierce fire in me belly t'"); myPirateDictionary.put("I wish I knew how to","I be hankerin' t'"); myPirateDictionary.put("my mother told me to","me dear ol' mum, bless her soul, tol' me t'"); myPirateDictionary.put("my companion would like to","me mate, ol' Rumpot, wants t'"); } }