-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBandNameMaker.java
More file actions
26 lines (21 loc) · 1.27 KB
/
BandNameMaker.java
File metadata and controls
26 lines (21 loc) · 1.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import java.util.Random;
public class BandNameMaker {
public static void main(String args[]) {
String[] nouns = {
"Noah", "the Noahs", "Barbie", "the Barbies", "the Nuclear Bomb", "the Nuclear Bombs", "Barney", "the Barnies", "Harry Potter", "the Harry Potters",
"Homer Simpson", "the Homer Simpsons", "the Simpson", "the Simpsons", "the Beatle", "the Beatles", "the Beetle", "the Beetles", "Percy Jackson",
"the Percy Jacksons", "My Little Pony", "my Little Ponies", "Phineas", "the Phineasi", "Ferb", "the Ferbs", "Calvin", "the Calvins", "Hobbes",
"the Hobbes", "Duck, Duck, Goose", "the Ducks, Ducks, Geese",
};
String noun1 = nouns[new Random().nextInt(nouns.length)];
String noun2 = nouns[new Random().nextInt(nouns.length)];
noun1 = noun1.substring(0, 1).toUpperCase() + noun1.substring(1);
System.out.println(">> GENERATED BAND NAME: " + noun1 + " and " + noun2);
System.out.println(">> ALL POSSIBILITIES: " + nouns.length*nouns.length);
try {
Runtime.getRuntime().exec("say " + noun1 + " and " + noun2);
} catch (Exception e) {
System.out.println(">> TEXT-TO-SPEECH ALGORITHM NOT COOPERATING");
}
}
}