|
@@ -70,10 +70,13 @@ public class MathMethods
|
70
|
70
|
}
|
71
|
71
|
|
72
|
72
|
public static String fortuneCookie() {
|
73
|
|
- String[] wiseWords = new String[] {"You're a hard worker and you will do great on all the labs!",
|
74
|
|
- "Look how much java you learned this week! That's awesome!", "Keep up the good Work" ,
|
75
|
|
- "Don't forget to talk to our visitors, they give us jobs!"};
|
76
|
|
- return "";
|
|
73
|
+ Random rand = new Random();
|
|
74
|
+ String[] wiseWords = new String[] {"You're a hard worker and you will do great on all the labs!",
|
|
75
|
+ "Look how much java you learned this week! That's awesome!", "Keep up the good work!" ,
|
|
76
|
+ "You're cushing it!", "You're a coding rockstar!",
|
|
77
|
+ "Keep coding!"};
|
|
78
|
+ int arrIndex = rand.nextInt(6)+1;
|
|
79
|
+ return wiseWords[arrIndex];
|
77
|
80
|
}
|
78
|
81
|
|
79
|
82
|
public static void printAns(String printAnswer){
|
|
@@ -87,47 +90,4 @@ public class MathMethods
|
87
|
90
|
|
88
|
91
|
|
89
|
92
|
|
90
|
|
-
|
91
|
|
-// public static double squareRoot(double n1) {
|
92
|
|
-// double result = Math.sqrt(x);
|
93
|
|
-// return result;
|
94
|
|
-// }
|
95
|
|
-
|
96
|
|
-// public static double invert(double n1) {
|
97
|
|
-// double result = x*-1;
|
98
|
|
-// return result;
|
99
|
|
-// }
|
100
|
|
-
|
101
|
|
-// public static double sin(double n1){
|
102
|
|
-// double result = Math.sin(x);
|
103
|
|
-// return result;
|
104
|
|
-// }
|
105
|
|
-
|
106
|
|
-// public static double iSin(double n1){
|
107
|
|
-// double result = Math.asin(x);
|
108
|
|
-// return result;
|
109
|
|
-// }
|
110
|
|
-
|
111
|
|
-// public static double degToRad(double n1) {
|
112
|
|
-// double result = Math.toRadians(x);
|
113
|
|
-// return result;
|
114
|
|
-// }
|
115
|
|
-
|
116
|
|
-// public static double radToDeg(double n1) {
|
117
|
|
-// double result = Math.toDegrees(x);
|
118
|
|
-// return result;
|
119
|
|
-// }
|
120
|
|
-
|
121
|
|
-// public static Double exponent(double n1, double n2){
|
122
|
|
-// return (Math.pow(n1, n2));
|
123
|
|
-// }
|
124
|
|
-
|
125
|
|
-// public static Double cosine(double n1){
|
126
|
|
-// return (Math.cos(n1));
|
127
|
|
-// }
|
128
|
|
-
|
129
|
|
-// public static Double invCosine(double n1){
|
130
|
|
-// return (Math.acos(n1));
|
131
|
|
-// }
|
132
|
|
-
|
133
|
|
-
|
|
93
|
+
|