trtong 434b97f838 Merge branch 'master' of laurengreen/ZCW-MacroLabs-OOP-ScientificCalculator into master | 6 years ago | |
---|---|---|
.DS_Store | 6 years ago | |
.gitignore | 6 years ago | |
Basic.java | 6 years ago | |
BasicTest.java | 6 years ago | |
Console.java | 6 years ago | |
MainApplication.java | 6 years ago | |
MainMenu.java | 6 years ago | |
MemoryFunc.java | 6 years ago | |
README.md | 6 years ago | |
RealAdvanced.java | 6 years ago | |
RealAdvancedTest.java | 6 years ago | |
SciCalc.java | 6 years ago | |
SwitchDisplay.java | 6 years ago | |
SwitchDisplayTest.java | 6 years ago | |
Trig.java | 6 years ago | |
TrigTest.java | 6 years ago | |
package.bluej | 6 years ago |
In this project you will build a small app to function as a calculator. This app will be built in Java, and will use the topics and techniques discussed during the week.
You should work on this project in your own repository. Click the fork
button in the top right corner to create a copy of this repository on your github account. You can go through the GitHub forking tutorial if you need additional practice with this.
All features must be tested. Tests must include normal behavior, and any possible error situations. Tests must have descriptive names and should be independent of each other (running or not running one test should not influence the behavior of any other test).
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 instructor by 5PM on Friday.
All calculators should have the following features:
Err
if an error occurs (eg: Division by zero)Each operation should automatically update the display
switchDisplayMode()
should rotate through the optionsswitchDisplayMode(String mode)
should set the display to the mode givenM+
key) Add the currently displayed value to the value in memory (store in memory and update display) *MC
key) Reset memory *MRC
key) Recall the current value from memory to the display *switchUnitsMode()
should rotate through the optionsswitchUnitsMode(String mode)
should set the trig units to the type givenIn addition to the Core and Scientific features, you are required to create at least two of your own features for the calculator. They can be any two features that are not already covered and that you can implement as you see fit. These features must be properly tested.
The following functions should take the displayed value (x) and updated it according to the given formula: (this may not be an exhaustive list)
square()
: x2squareRoot()
: √xinverse()
: 1/xswitchSign()
: -xsine()
: sin(x)cosine()
: cos(x)tangent()
: tan(x)inverseSine()
: sin-1(x)inverseCosine()
: sin-1(x)inverseTangent()
: tan-1(x)factorial()
: x! (x factorial)Completed projects should be submitted by submitting a pull request against the original repository. All work should be done in your own repository.