Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Madelyn and john #3

Open
wants to merge 79 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
79 commits
Select commit Hold shift + click to select a range
e48e18a
Initial commit
MadelynTav May 5, 2015
97c6850
Skeleton
MadelynTav May 6, 2015
3e40df1
merge github.com:MadelynTav/CalculatorAppProject
MadelynTav May 6, 2015
821ac8b
layouts laid out
MadelynTav May 10, 2015
c211077
Lib update
MadelynTav May 14, 2015
b1f646a
added buttons to the main in java
lighterletter May 14, 2015
cce9308
merging buttons made branch
lighterletter May 14, 2015
ec7e568
slight arrangements to the buttons. need to update with expressions.java
lighterletter May 14, 2015
98b94f5
John's changes on Buttons
lighterletter May 16, 2015
3784fe3
Madeys Changes
MadelynTav May 16, 2015
0d3e17d
added e to expressions.java
lighterletter May 16, 2015
0575617
merged
MadelynTav May 16, 2015
da77b0d
Merged files
MadelynTav May 16, 2015
c513963
making some more changes
MadelynTav May 16, 2015
60765f9
Added TODOs
MadelynTav May 16, 2015
26a1318
added launcher icon and background image to layout
lighterletter May 16, 2015
83ddcb1
updates
MadelynTav May 16, 2015
46cf4d4
after merge additional POS and NEG mathods
MadelynTav May 16, 2015
4595578
Playing around with percentChange method
MadelynTav May 17, 2015
ce3fc2e
updates
MadelynTav May 17, 2015
3f707e1
finished ans function
lighterletter May 17, 2015
9a7fea9
Pos/Neg
MadelynTav May 17, 2015
e4b86a6
POS/NEG
MadelynTav May 17, 2015
dadb2a2
merged negative with ANS
MadelynTav May 17, 2015
6ff931b
NUll pointer exception
MadelynTav May 17, 2015
727b76d
added more exception handling
lighterletter May 17, 2015
5b63f50
changes
MadelynTav May 17, 2015
c3dd649
Merge github.com:MadelynTav/CalculatorAppProject
MadelynTav May 17, 2015
a6399ee
minute changes
lighterletter May 17, 2015
1e3036d
added absolute value
lighterletter May 17, 2015
c5e0a9f
added to do and fixed PI
lighterletter May 17, 2015
3c00dc5
fixed pi, log, and exponent functions
lighterletter May 17, 2015
a8afb74
Playing with parens
MadelynTav May 17, 2015
9c88ec9
merging
MadelynTav May 17, 2015
bdd4840
Abs editing
MadelynTav May 18, 2015
fdb8966
saving log10 sqrt fixes and preparing for current merge
lighterletter May 18, 2015
033a3b9
Merge branch 'master' of github.com:MadelynTav/CalculatorAppProject
lighterletter May 18, 2015
c51a80a
validating parens working
MadelynTav May 18, 2015
6c9a0df
Smart Parens Added
MadelynTav May 18, 2015
fe9f8eb
merging
lighterletter May 18, 2015
312f690
added inverse operands, organized button layout, added diff backgroun…
lighterletter May 18, 2015
09fa570
clearing screen
MadelynTav May 19, 2015
169e9be
merging with clear screen intact
MadelynTav May 19, 2015
f86caf3
fixed bug for screen clear
MadelynTav May 19, 2015
b8447ba
cleaned up code, fixed vertical parenthesis, rearranged horizontal la…
lighterletter May 19, 2015
7a36177
fixed socah bug
MadelynTav May 19, 2015
4773df1
Merge github.com:MadelynTav/CalculatorAppProject
MadelynTav May 19, 2015
c4dfaa2
arcs changes
MadelynTav May 19, 2015
341d839
fixing inconsistencies
MadelynTav May 19, 2015
51cb70f
fixed AC
MadelynTav May 19, 2015
39f1418
layout fix, removed unecessary buttons
lighterletter May 19, 2015
53c24cc
please test
MadelynTav May 19, 2015
d7819eb
fixing layout elements
lighterletter May 19, 2015
7b0dfa8
fixed button layout and merge conflicts
lighterletter May 19, 2015
0e9ff32
savedIntanceState added
MadelynTav May 19, 2015
9215043
SaveOnInstance Fixed and equals fixed
MadelynTav May 19, 2015
e802fd5
debugging
MadelynTav May 19, 2015
ba4c493
Updated TODOS
MadelynTav May 19, 2015
09deed7
Another addition to TODO
MadelynTav May 19, 2015
31bd42a
less passive
MadelynTav May 19, 2015
ed4a872
ans working and updating
MadelynTav May 19, 2015
0a135ad
edge cases TODO added
MadelynTav May 19, 2015
ce8e808
backtracking
MadelynTav May 19, 2015
fc05434
fixed AC
MadelynTav May 19, 2015
5d6bd4b
Prepped code for clean up.
lighterletter May 19, 2015
8fdf07e
merging after epic bug fix.
lighterletter May 19, 2015
f7c9211
working calculator. Correct results
lighterletter May 19, 2015
3c80173
major overhaul many bugs fixed layout and function cleaner.
lighterletter May 20, 2015
389cc3e
Delete X!
lighterletter May 20, 2015
2ce9620
changes
MadelynTav May 20, 2015
23e6ec9
added comments and fixed minor parens problem
MadelynTav May 20, 2015
52d684a
cleaned up comments reformatted code
lighterletter May 21, 2015
cea1374
Update README.md
lighterletter May 21, 2015
160a46c
Update README.md
lighterletter May 21, 2015
2aa7fa0
factorial method and button added
MadelynTav May 21, 2015
3a618d5
added error handling
lighterletter May 21, 2015
1c7ba0c
Project
MadelynTav May 21, 2015
2034568
Madelyn and John
MadelynTav May 21, 2015
a908274
update
MadelynTav May 21, 2015
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.gradle
/local.properties
/.idea/workspace.xml
/.idea/libraries
.DS_Store
/build
1 change: 1 addition & 0 deletions .idea/.name

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 23 additions & 0 deletions .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions .idea/copyright/profiles_settings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions .idea/dictionaries/c4q_john.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions .idea/encodings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 18 additions & 0 deletions .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions .idea/inspectionProfiles/Project_Default.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions .idea/inspectionProfiles/profiles_settings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

36 changes: 36 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions .idea/scopes/scope_settings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 19 additions & 0 deletions Calculator.iml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<module external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$" external.system.id="GRADLE" external.system.module.group="" external.system.module.version="unspecified" type="JAVA_MODULE" version="4">
<component name="FacetManager">
<facet type="java-gradle" name="Java-Gradle">
<configuration>
<option name="BUILD_FOLDER_PATH" value="$MODULE_DIR$/build" />
</configuration>
</facet>
</component>
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/.gradle" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

65 changes: 65 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,67 @@
<<<<<<< HEAD
# CalculatorAppProject

### Introduction

As the name implies, this is a calculator meant to be run on the android platform. Made in android studio as a two-person group project it is our our submission for the unit-1 final assignment.

### functionality

- To use the RAD nad DEG functions you must add a '(' after. No need to close them.
- If you press the +/- sign when there is an expression on the screen, this will calculate it for you and return the opposite value.

## featured
- ans = saves current ans
- c/ans = clears current ans
- log
- log10
- square root
- sin, cos, tan
- deg
- rad
- exponent
- e
- pi
- phi
- modulus <--works as it would on java, returning the remainded of the operation its called on.
- ()
- abs = absolute value
- ce = clear end
- ac = all clear

###Code

There are two main layouts:

- An every day working calculator in vertical mode.
- A scientific calculator when device is horizontal extending the functionality of the regular calculator.

There is a specified layout XML file for each mode. There is also a specialized themed XML in the drawable folder under res which draws the edges in some of the UI elements.

To calculate user input we chose to use EvalEx an expression calculator written in java.
For reference see: https://github.com/uklimaschewski/EvalEx

Our MainActivity class handles user input which we chose to handle through the use of methods called by the OnClick attributes specified for each button in the xml.

We buit specified methods when necessary while doing our best to keep our code optimized and concise. The Following is a breakdown of the methods used and the division of labor.

- onCreate: both
- getButtonText: both
- ce: John
- getOperators: Madelyn
- sohcahtoa: Madelyn
- positiveNegativeSwitch: both
- allClear: John
- ans: John
- clearAns: John
- absButton: John
- checkParenthesis: Madelyn
- openCloseParens: Madelyn
- evaluateExpression: both
- onSaveInstanceState: Madelyn

When it came to the layout, testing and error handling there was an equal division of labor from both of us.
=======
# calculator
Submit your calculator projects here
>>>>>>> 565fe4086ff5928deb9f232fe32938e1acd9b467
1 change: 1 addition & 0 deletions app/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
93 changes: 93 additions & 0 deletions app/app.iml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
<?xml version="1.0" encoding="UTF-8"?>
<module external.linked.project.id=":app" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$/.." external.system.id="GRADLE" external.system.module.group="Calculator" external.system.module.version="unspecified" type="JAVA_MODULE" version="4">
<component name="FacetManager">
<facet type="android-gradle" name="Android-Gradle">
<configuration>
<option name="GRADLE_PROJECT_PATH" value=":app" />
</configuration>
</facet>
<facet type="android" name="Android">
<configuration>
<option name="SELECTED_BUILD_VARIANT" value="debug" />
<option name="SELECTED_TEST_ARTIFACT" value="_android_test_" />
<option name="ASSEMBLE_TASK_NAME" value="assembleDebug" />
<option name="COMPILE_JAVA_TASK_NAME" value="compileDebugSources" />
<option name="ASSEMBLE_TEST_TASK_NAME" value="assembleDebugAndroidTest" />
<option name="SOURCE_GEN_TASK_NAME" value="generateDebugSources" />
<option name="TEST_SOURCE_GEN_TASK_NAME" value="generateDebugAndroidTestSources" />
<option name="ALLOW_USER_CONFIGURATION" value="false" />
<option name="MANIFEST_FILE_RELATIVE_PATH" value="/src/main/AndroidManifest.xml" />
<option name="RES_FOLDER_RELATIVE_PATH" value="/src/main/res" />
<option name="RES_FOLDERS_RELATIVE_PATH" value="file://$MODULE_DIR$/src/main/res" />
<option name="ASSETS_FOLDER_RELATIVE_PATH" value="/src/main/assets" />
</configuration>
</facet>
</component>
<component name="NewModuleRootManager" inherit-compiler-output="false">
<output url="file://$MODULE_DIR$/build/intermediates/classes/debug" />
<output-test url="file://$MODULE_DIR$/build/intermediates/classes/androidTest/debug" />
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/r/debug" isTestSource="false" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/aidl/debug" isTestSource="false" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/buildConfig/debug" isTestSource="false" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/rs/debug" isTestSource="false" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/rs/debug" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/generated/debug" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/r/androidTest/debug" isTestSource="true" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/aidl/androidTest/debug" isTestSource="true" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/buildConfig/androidTest/debug" isTestSource="true" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/rs/androidTest/debug" isTestSource="true" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/rs/androidTest/debug" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/generated/androidTest/debug" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/res" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/resources" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/assets" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/aidl" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/jni" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/rs" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/res" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/main/assets" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/main/aidl" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/jni" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/rs" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/res" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/resources" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/assets" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/aidl" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/jni" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/rs" isTestSource="true" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/assets" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/bundles" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/classes" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/coverage-instrumented-classes" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/dependency-cache" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/dex" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/dex-cache" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/jacoco" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/javaResources" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/libs" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/lint" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/manifests" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/ndk" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/pre-dexed" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/proguard" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/res" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/rs" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/symbols" />
<excludeFolder url="file://$MODULE_DIR$/build/outputs" />
<excludeFolder url="file://$MODULE_DIR$/build/tmp" />
</content>
<orderEntry type="jdk" jdkName="Android API 22 Platform" jdkType="Android SDK" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" exported="" name="appcompat-v7-22.1.1" level="project" />
<orderEntry type="library" exported="" name="support-v4-22.1.1" level="project" />
<orderEntry type="library" exported="" name="support-annotations-22.1.1" level="project" />
</component>
</module>

25 changes: 25 additions & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion 22
buildToolsVersion "22.0.1"

defaultConfig {
applicationId "madelyntav.c4q.nyc.calculator"
minSdkVersion 17
targetSdkVersion 22
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:22.1.1'
}
17 changes: 17 additions & 0 deletions app/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in /Users/c4q-madelyntavarez/Library/Android/sdk/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the proguardFiles
# directive in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html

# Add any project specific keep options here:

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package madelyntav.c4q.nyc.calculator;

import android.app.Application;
import android.test.ApplicationTestCase;

/**
* <a href="http://d.android.com/tools/testing/testing_android.html">Testing Fundamentals</a>
*/
public class ApplicationTest extends ApplicationTestCase<Application> {
public ApplicationTest() {
super(Application.class);
}
}
Loading