Skip to content

Instantly share code, notes, and snippets.

@3leftturns
Created August 21, 2014 19:04
Show Gist options
  • Save 3leftturns/32b369e97c3f0db846ad to your computer and use it in GitHub Desktop.
Save 3leftturns/32b369e97c3f0db846ad to your computer and use it in GitHub Desktop.
The Phrase-O-Matic from Head First Java. My first Java app! Compile and run. It gives pervasive 30,000 foot buzzphrases.
public class PhraseOMatic {
public static void main (String[] args) {
String[] wordListOne = {
"24/7",
"multi-Tier",
"30,000 foot",
"B-to-B",
"win-win",
"front-end",
"web-based",
"pervasive",
"smart",
"six-sigma",
"critical-path",
"dynamic",
"Internet-connected"
};
String[] wordListTwo = {
"empowered",
"powered",
"sticky",
"value-added",
"oriented",
"centric",
"distributed",
"clustered",
"branded",
"outside-the-box",
"positioned",
"networked",
"focused",
"leveraged",
"aligned",
"targeted",
"shared",
"cooperative",
"accelerated"
};
String[] wordListThree = {
"tipping point",
"solution",
"process",
"architecture",
"core competency",
"strategy",
"mindshare",
"portal",
"space",
"vision",
"paradigm",
"mission"
};
int oneLength = wordListOne.length;
int twoLength = wordListTwo.length;
int threeLength = wordListThree.length;
int rand1 = (int) (Math.random()* oneLength);
int rand2 = (int) (Math.random()* twoLength);
int rand3 = (int) (Math.random()* threeLength);
String phrase = wordListOne[rand1] + " " + wordListTwo[rand2] + " " + wordListThree[rand3];
System.out.println("What we need is a " + phrase);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment