-
Notifications
You must be signed in to change notification settings - Fork 0
Tip On Discount is an Android tip calculator. It figures a tip based on the actual cost of a meal. The actual cost is the amount paid on the bill, excluding sales tax, but including any discounts that were applied. This insures your server gets tipped fairly. TOD will split a bill between multiple parties and let you round each share to, say, th…
License
zymurgeek/TipOnDiscount
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Tip On Discount is a free Android tip calculator with NO ADS and NO REQUIRED PERMISSIONS. To calculate your tip, in most cases, all you need to do is enter the bill total. TOD will subtract the tax and calculate the tip for you. You don't even have to press a "calculate" button. The math is performed on the fly as you type. TOD can split a bill between multiple parties and round each share to any amount you like. Say you're out to a nice dinner with friends: When the bill comes, someone looks it over and says, "it's $103 a couple". If you don't have single bills, what kind of a tip are you leaving if you all throw in $105? If you don't have fives, is $110 too much or should you wait for change? Maybe your server was really great and you decide to pay with twenties. How good should you feel about yourself for leaving such a great tip? This app tells you with one button. (In case you're curious, the last scenario works out to about a 36% tip in a state with 7% tax--you're really swell!) For techies: The code makes full use of JUnit test cases and Android JUnit test cases. Since it is a relatively small application, it should be useful to those who want to learn Android development and automated unit testing. To build this software, you'll need the Android SDK. See http://developer.android.com If you haven't already, create the Android Support library project using the v7 appcompat library. See: http://developer.android.com/tools/support-library/setup.html If you have your SDK in a different location than in your home directory, or you have a different version of the SDK, you'll need to update that location in App/project.properties. You can do this in Eclipse using the instructions in "Adding libraries with resources" (expand "Using Eclipse"): http://developer.android.com/tools/support-library/setup.html#libs-with-res Note that the "library pane" the instructions reference is listed under the "Android" category in the list on the left of the Properties dialog. This documentation issue has been reported: http://code.google.com/p/android/issues/detail?id=61239 Once the support library is ready, import the code from the Elipse menu File -> Import. Expand General and select Existing Projects into Workspace. Select Browse next to "Select root directory" and select the TipOnDiscount top level directory. Three projects, TipOnDiscount, TipOnDiscountAndroidJUnitTests and TipOnDiscountJUnitTests, will be selected. Select Finish. To run the JUnit tests, you'll need JMock 2.6 (http://jmock.org/). This is optional, but recommended if you'll be modifying code. Download the Binary JARs and unzip them to a location of your choice. In Eclipse, set JMOCK_HOME to the new JMock directory, e.g., /home/myuser/jmock-2.6.0 for Linux or c:\jmock-2.6.0 for Windows. To do this, from the Eclipse menu, select Window -> Preferences. In the left pane, expand Java and then Build Path. Select Classpath Variables. On the right, select New. Set the Name to JMOCK_HOME and select Folder next to Path. Select the new JMock directory. The tests can be run by right-clicking on the TipOnDiscountJUnitTests project and selecting Run As > JUnit Test. These tests are very fast--the entire suite runs in under a second even on older hardware. To run the Android JUnit tests, start an emulator supporting API 7 or greater. for help, see http://developer.android.com/tools/help/emulator.html. Once the emulator is running, right click on the TipOnDiscountAndroidJUnitTests project and select Run As > Android JUnit Test. After you start the test, bring up the emulator window and watch as the tests put the app through its paces. Since these tests are running on the emulator, they're a lot slower than the JUnit tests and take a few minutes to finish.
About
Tip On Discount is an Android tip calculator. It figures a tip based on the actual cost of a meal. The actual cost is the amount paid on the bill, excluding sales tax, but including any discounts that were applied. This insures your server gets tipped fairly. TOD will split a bill between multiple parties and let you round each share to, say, th…
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published