소스 검색

DEMO CALC

Nathan Hall 6 년 전
부모
커밋
936a45b60f
4개의 변경된 파일56개의 추가작업 그리고 123개의 파일을 삭제
  1. 5
    5
      Calculator.java
  2. 1
    1
      MathMethods.java
  3. 18
    0
      README-CheckItOut.txt.rtf
  4. 32
    117
      package.bluej

+ 5
- 5
Calculator.java 파일 보기

@@ -28,7 +28,7 @@ public class Calculator{
28 28
             Scanner input1 = new Scanner(System.in);
29 29
             System.out.println("What do you want to do?");
30 30
 
31
-            toDo = input1.next();
31
+            toDo = input1.nextLine();
32 32
 
33 33
             if (toDo.equalsIgnoreCase("quit")){
34 34
                 off = true;
@@ -55,11 +55,12 @@ public class Calculator{
55 55
                     case "tangent" :
56 56
                     case "inverse tangent" :
57 57
                     case "inverse" :
58
+                    case "roundTo" :
58 59
 
59 60
                     System.out.println(toDo + " -- Enter first number:");
60 61
                     num1 = input1.nextDouble();
61 62
                     //System.out.println("num1 is: " + num1);
62
-
63
+                }
63 64
                     switch (toDo){
64 65
                         case "add":
65 66
                         case "subtract":
@@ -219,7 +220,7 @@ public class Calculator{
219 220
                         result = Memory.memClear();
220 221
                         Memory.printAns(String.valueOf(result));
221 222
                         break;
222
-                        
223
+
223 224
                         case "roundTo":
224 225
                         memory = result;
225 226
                         calc.roundTo(memory, (int)num1);
@@ -231,6 +232,5 @@ public class Calculator{
231 232
         }
232 233
 
233 234
     }
234
-}
235 235
 
236
-    
236
+

+ 1
- 1
MathMethods.java 파일 보기

@@ -83,7 +83,7 @@ public class MathMethods
83 83
                 "You're cushing it!", "You're a coding rockstar!", 
84 84
                 "Keep coding!"};  
85 85
         int arrIndex = rand.nextInt(6);
86
-        System.out.println(arrIndex);
86
+     
87 87
         return wiseWords[arrIndex];
88 88
     }
89 89
 

+ 18
- 0
README-CheckItOut.txt.rtf 파일 보기

@@ -0,0 +1,18 @@
1
+{\rtf1\ansi\ansicpg1252\cocoartf1561\cocoasubrtf600
2
+{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
3
+{\colortbl;\red255\green255\blue255;}
4
+{\*\expandedcolortbl;;}
5
+\margl1440\margr1440\vieww10800\viewh8400\viewkind0
6
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0
7
+
8
+\f0\fs24 \cf0 Team: Calc Crew\
9
+	\
10
+	Seth Abrams\
11
+	Nathan Hall\
12
+	Maggie Pierce\
13
+	\
14
+\
15
+Additional Features:\
16
+- Fortune Cookie\
17
+- Random Number\
18
+- Rounding}

+ 32
- 117
package.bluej 파일 보기

@@ -1,79 +1,35 @@
1 1
 #BlueJ package file
2
-<<<<<<< HEAD
3
-<<<<<<< HEAD
4
-dependency1.from=Calculator
5
-dependency1.to=MathMethods
2
+dependency1.from=MemoryTest
3
+dependency1.to=Memory
6 4
 dependency1.type=UsesDependency
7
-dependency2.from=MathMethods
8
-dependency2.to=Calculator
5
+dependency2.from=MathMethodsTest
6
+dependency2.to=MathMethods
9 7
 dependency2.type=UsesDependency
10
-dependency3.from=MathMethodsTest
11
-dependency3.to=MathMethods
12
-dependency3.type=UsesDependency
13
-editor.fx.0.height=816
14
-editor.fx.0.width=889
15
-editor.fx.0.x=513
16
-editor.fx.0.y=23
17
-objectbench.height=80
18
-objectbench.width=480
19
-package.divider.horizontal=0.5997536945812808
20
-package.divider.vertical=0.8838451268357811
21
-package.editor.height=655
22
-package.editor.width=706
23
-package.editor.x=0
24
-package.editor.y=23
25
-package.frame.height=807
26
-package.frame.width=832
27
-package.numDependencies=3
28
-package.numTargets=3
29
-=======
30
-dependency1.from=MathMethodsTest
31
-dependency1.to=MathMethods
32
-dependency1.type=UsesDependency
33
-dependency2.from=MemoryTest
34
-dependency2.to=Memory
35
-dependency2.type=UsesDependency
36
-dependency3.from=Calculator
37
-dependency3.to=MathMethods
8
+dependency3.from=MathMethods
9
+dependency3.to=Calculator
38 10
 dependency3.type=UsesDependency
39 11
 dependency4.from=Calculator
40
-dependency4.to=Memory
12
+dependency4.to=MathMethods
41 13
 dependency4.type=UsesDependency
42
-editor.fx.0.height=814
43
-editor.fx.0.width=1191
44
-editor.fx.0.x=201
45
-editor.fx.0.y=-974
46
-objectbench.height=80
47
-objectbench.width=595
48
-package.divider.horizontal=0.5993322203672788
49
-package.divider.vertical=0.8465608465608465
50
-package.editor.height=473
51
-package.editor.width=493
52
-package.editor.x=-188
53
-package.editor.y=-610
54
-package.frame.height=625
55
-=======
56
-dependency1.from=Calculator
57
-dependency1.to=MathMethods
58
-dependency1.type=UsesDependency
59
-editor.fx.0.height=722
60
-editor.fx.0.width=800
61
-editor.fx.0.x=0
62
-editor.fx.0.y=132
63
-objectbench.height=205
14
+dependency5.from=Calculator
15
+dependency5.to=Memory
16
+dependency5.type=UsesDependency
17
+editor.fx.0.height=967
18
+editor.fx.0.width=1106
19
+editor.fx.0.x=115
20
+editor.fx.0.y=-945
21
+objectbench.height=203
64 22
 objectbench.width=595
65 23
 package.divider.horizontal=0.6
66
-package.divider.vertical=0.6849925705794948
67
-package.editor.height=454
24
+package.divider.vertical=0.6856287425149701
25
+package.editor.height=451
68 26
 package.editor.width=493
69 27
 package.editor.x=35
70 28
 package.editor.y=23
71
-package.frame.height=731
72
->>>>>>> a0c06052a8de50df57cd0a41d73ffc3f9ce302c2
29
+package.frame.height=726
73 30
 package.frame.width=619
74
-package.numDependencies=4
31
+package.numDependencies=5
75 32
 package.numTargets=5
76
->>>>>>> 2a9a289e4239250cd6e2f776f8cc64f1130c5a52
77 33
 package.showExtends=true
78 34
 package.showUses=true
79 35
 project.charset=UTF-8
@@ -83,78 +39,37 @@ readme.width=47
83 39
 readme.x=10
84 40
 readme.y=10
85 41
 target1.height=50
86
-<<<<<<< HEAD
87 42
 target1.name=MemoryTest
88
-=======
89
-target1.name=Calculator
90
->>>>>>> a0c06052a8de50df57cd0a41d73ffc3f9ce302c2
91 43
 target1.showInterface=false
92
-<<<<<<< HEAD
93
-target1.type=ClassTarget
94
-<<<<<<< HEAD
95
-target1.width=140
96
-target1.x=80
97
-target1.y=200
98
-target2.height=50
99
-target2.name=MathMethodsTest
100
-target2.showInterface=false
101
-target2.type=UnitTestTargetJunit4
102
-target2.width=110
103
-target2.x=270
104
-target2.y=310
105
-target3.association=MathMethodsTest
106
-target3.height=50
107
-target3.name=MathMethods
108
-target3.showInterface=false
109
-target3.type=ClassTarget
110
-target3.width=110
111
-target3.x=240
112
-target3.y=340
113
-=======
114 44
 target1.type=UnitTestTargetJunit4
115
-target1.width=80
116
-target1.x=400
117
-target1.y=140
118
-target2.association=MemoryTest
45
+target1.width=100
46
+target1.x=150
47
+target1.y=10
119 48
 target2.height=50
120 49
 target2.name=Memory
121 50
 target2.showInterface=false
122 51
 target2.type=ClassTarget
123 52
 target2.width=80
124
-target2.x=370
125
-target2.y=170
53
+target2.x=200
54
+target2.y=70
126 55
 target3.height=50
127 56
 target3.name=Calculator
128 57
 target3.showInterface=false
129 58
 target3.type=ClassTarget
130
-target3.width=90
131
-target3.x=220
132
-target3.y=80
59
+target3.width=120
60
+target3.x=70
61
+target3.y=70
133 62
 target4.height=50
134 63
 target4.name=MathMethodsTest
135 64
 target4.showInterface=false
136 65
 target4.type=UnitTestTargetJunit4
137
-target4.width=110
138
-target4.x=90
139
-target4.y=250
140
-target5.association=MathMethodsTest
66
+target4.width=140
67
+target4.x=10
68
+target4.y=130
141 69
 target5.height=50
142 70
 target5.name=MathMethods
143 71
 target5.showInterface=false
144 72
 target5.type=ClassTarget
145 73
 target5.width=110
146
-target5.x=60
147
-target5.y=280
148
->>>>>>> 2a9a289e4239250cd6e2f776f8cc64f1130c5a52
149
-=======
150
-target1.width=120
151
-target1.x=70
152
-target1.y=70
153
-target2.height=50
154
-target2.name=MathMethods
155
-target2.showInterface=false
156
-target2.type=ClassTarget
157
-target2.width=110
158
-target2.x=80
159
-target2.y=200
160
->>>>>>> a0c06052a8de50df57cd0a41d73ffc3f9ce302c2
74
+target5.x=80
75
+target5.y=200