Nhu Nguyen 6 anni fa
parent
commit
cdab20c162

+ 25
- 1
.gitignore Vedi File

152
 
152
 
153
 
153
 
154
 #maven build target
154
 #maven build target
155
-target/
155
+target/
156
+
157
+# ---> Java
158
+# Compiled class file
159
+*.class
160
+
161
+# Log file
162
+*.log
163
+
164
+# BlueJ files
165
+*.ctxt
166
+
167
+# Mobile Tools for Java (J2ME)
168
+.mtj.tmp/
169
+
170
+# Package Files #
171
+*.jar
172
+*.war
173
+*.ear
174
+*.zip
175
+*.tar.gz
176
+*.rar
177
+
178
+# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
179
+hs_err_pid*

src/main/java/com/zipcodewilmington/scientificcalculator/Console.java → Console.java Vedi File

1
-package com.zipcodewilmington.scientificcalculator;
1
+ 
2
 
2
 
3
 import java.util.Scanner;
3
 import java.util.Scanner;
4
 
4
 

src/main/java/com/zipcodewilmington/scientificcalculator/MainApplication.java → MainApplication.java Vedi File

1
-package com.zipcodewilmington.scientificcalculator;
1
+ 
2
 
2
 
3
 /**
3
 /**
4
  * Created by leon on 2/9/18.
4
  * Created by leon on 2/9/18.

+ 15
- 12
README.md Vedi File

16
 
16
 
17
 ### Documentation
17
 ### Documentation
18
 
18
 
19
-You must produce UML diagrams for your program. All classes (excluding test classes) must be included in the UML class diagrams.
19
+You must produce UML diagrams for your program. All classes (excluding test classes) must be included in the UML class diagrams. Your UML must be approved by an instructure by 5PM on Friday.
20
 
20
 
21
-### Core Features 
21
+### Core Features
22
 
22
 
23
 All calculators should have the following features:
23
 All calculators should have the following features:
24
 
24
 
25
-- A state, representing the value currently displayed on the calculator (default 0) *
26
-- Get the current number on the display *
27
-- Clear the display *
28
-- Change the number on the display *
25
+- A state, representing the value currently displayed on the calculator (default 0)
26
+- Get the current number on the display
27
+- Clear the display
28
+- Change the number on the display
29
 - Add, subtract, multiply, and divide the value on the display by a given number
29
 - Add, subtract, multiply, and divide the value on the display by a given number
30
-- Calculate the square (x<sup>2</sup>) and square root (√x) of the number on the display *
30
+- Calculate the square (x<sup>2</sup>) and square root (√x) of the number on the display
31
 - Calculate variable exponentiation (x<sup>y</sup>)
31
 - Calculate variable exponentiation (x<sup>y</sup>)
32
-- Calculate the inverse of the number on the display (1/x) *
32
+- Calculate the inverse of the number on the display (1/x)
33
 - Invert the sign of the number on the display (switch between positive and negative)
33
 - Invert the sign of the number on the display (switch between positive and negative)
34
-- Update the display to `Err` if an error occurs (eg: Division by zero) *
35
-- Errors must be cleared before any other operation can take place *
34
+- Update the display to `Err` if an error occurs (eg: Division by zero)
35
+- Errors must be cleared before any other operation can take place
36
 
36
 
37
 Each operation should automatically update the display
37
 Each operation should automatically update the display
38
 
38
 
56
 - Switch trig units mode (Degrees, Radians)
56
 - Switch trig units mode (Degrees, Radians)
57
   - `switchUnitsMode()` should rotate through the options
57
   - `switchUnitsMode()` should rotate through the options
58
   - `switchUnitsMode(String mode)` should set the trig units to the type given
58
   - `switchUnitsMode(String mode)` should set the trig units to the type given
59
+
60
+### Bonus
61
+- Factorial function  
59
 - Logarithmic functions
62
 - Logarithmic functions
60
   - Log
63
   - Log
61
   - 10<sup>x</sup> (inverse logarithm)
64
   - 10<sup>x</sup> (inverse logarithm)
62
   - Ln (natural logarithm)
65
   - Ln (natural logarithm)
63
   - e<sup>x</sup> (inverse natural logarithm)
66
   - e<sup>x</sup> (inverse natural logarithm)
64
-- Factorial function  
67
+
65
 
68
 
66
 
69
 
67
 ### Custom Features
70
 ### Custom Features
86
 
89
 
87
 ## Submission
90
 ## Submission
88
 
91
 
89
-Completed projects should be submitted by submitting a pull request against the [original repository](https://github.com/Zipcoder/project-1-calculator). All work should be done in your own repository.
92
+Completed projects should be submitted by submitting a pull request against the [original repository](https://git.zipcode.rocks/ZipCodeWilmington/ZCW-MacroLabs-OOP-ScientificCalculator). All work should be done in your own repository.

+ 42
- 0
package.bluej Vedi File

1
+#BlueJ package file
2
+dependency1.from=MainApplication
3
+dependency1.to=Console
4
+dependency1.type=UsesDependency
5
+editor.fx.0.height=722
6
+editor.fx.0.width=800
7
+editor.fx.0.x=640
8
+editor.fx.0.y=23
9
+objectbench.height=214
10
+objectbench.width=595
11
+package.divider.horizontal=0.6
12
+package.divider.vertical=0.6847360912981455
13
+package.editor.height=473
14
+package.editor.width=493
15
+package.editor.x=35
16
+package.editor.y=60
17
+package.frame.height=759
18
+package.frame.width=619
19
+package.numDependencies=1
20
+package.numTargets=2
21
+package.showExtends=true
22
+package.showUses=true
23
+project.charset=UTF-8
24
+readme.height=58
25
+readme.name=@README
26
+readme.width=47
27
+readme.x=10
28
+readme.y=10
29
+target1.height=50
30
+target1.name=Console
31
+target1.showInterface=false
32
+target1.type=ClassTarget
33
+target1.width=80
34
+target1.x=80
35
+target1.y=200
36
+target2.height=50
37
+target2.name=MainApplication
38
+target2.showInterface=false
39
+target2.type=ClassTarget
40
+target2.width=120
41
+target2.x=70
42
+target2.y=70

+ 0
- 12
pom.xml Vedi File

1
-<?xml version="1.0" encoding="UTF-8"?>
2
-<project xmlns="http://maven.apache.org/POM/4.0.0"
3
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5
-    <modelVersion>4.0.0</modelVersion>
6
-
7
-    <groupId>com.zipcodewilmington</groupId>
8
-    <artifactId>scientific_calculator</artifactId>
9
-    <version>1.0-SNAPSHOT</version>
10
-
11
-
12
-</project>

+ 0
- 7
src/test/java/com/zipcodewilmington/scientific_calculator/TestMainApplication.java Vedi File

1
-package com.zipcodewilmington.scientific_calculator;
2
-
3
-/**
4
- * Created by leon on 2/9/18.
5
- */
6
-public class TestMainApplication {
7
-}