Commit 170305c

mokha <mokha@cisco.com>
2019-05-06 00:01:28
start to write tests for existing TaxReturn code.
1 parent b1bb511
Changed files (3)
assignments
assignment1
src
main
java
ca
mokhan
assignment1
test
java
ca
mokhan
assignments/assignment1/src/main/java/ca/mokhan/assignment1/TaxReturn.java
@@ -1,3 +1,5 @@
+package ca.mokhan.assignment1;
+
 import java.util.Scanner;
 
 public class TaxReturn {
assignments/assignment1/src/test/java/ca/mokhan/assignment1/TaxReturnTest.java
@@ -0,0 +1,19 @@
+package ca.mokhan.assignment1;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+public class TaxReturnTest extends TestCase {
+  public TaxReturnTest(String testName) {
+    super(testName);
+  }
+
+  public static Test suite() {
+    return new TestSuite(TaxReturnTest.class);
+  }
+
+  public void testTrue() {
+    assertTrue(true);
+  }
+}
assignments/assignment1/README.md
@@ -234,6 +234,11 @@ If the total of a number (x) and its subsequent number (x+1) is a value divisibl
 If the number is prime, print “prime”.
 
 10. Modify the following program to the specifications given below:
-Add a new status – SingleParent – where the tax is computed as a SINGLE but with a further reduction of $5000 per child.
-Add a new tax condition – if the income is greater than $249,999 for SINGLE, then add a tax of 25% on income amount above $150,000; if the income is greater than $349,999 for MARRIED, then add a tax of 35% on income amount above $200,000.
+
+* Add a new status –
+  SingleParent – where the tax is computed as a SINGLE but with a further reduction of $5000 per child.
+* Add a new tax condition – 
+  if the income is greater than $249,999 for SINGLE, then add a tax of 25% on income amount above $150,000;
+  if the income is greater than $349,999 for MARRIED, then add a tax of 35% on income amount above $200,000.
+
 Unknown status – if the status doesn’t belong to SINGLE or MARRIED or SINGLE_PARENT, then compute a 33% tax on the income.