-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPhraseOMatic.java
More file actions
49 lines (42 loc) · 1.64 KB
/
PhraseOMatic.java
File metadata and controls
49 lines (42 loc) · 1.64 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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/**
*
*/
/**
* @author DELL
* Project Name: Java_learn
* Class Name: PhraseOMatic
* date: 2019年8月19日{time}
*/
public class PhraseOMatic {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
String[] wordListOne = {"24/7","multi-Tier","30,000 foot","B-to-B",
"win-win","frontend","web-based","pervasive", "smart","sixsigma",
"critical-path","dynamic"};
String[] wordListTwo = {"empowered", "sticky",
"value-added", "oriented", "centric", "distributed",
"clustered", "branded","outside-the-box", "positioned",
"networked", "focused", "leveraged", "aligned",
"targeted", "shared", "cooperative", "accelerated"};
String[] wordListThree = {"process", "tippingpoint",
"solution", "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);
}
}