diff options
| author | mokha <mokha@cisco.com> | 2019-05-07 09:07:51 -0600 |
|---|---|---|
| committer | mokha <mokha@cisco.com> | 2019-05-07 09:07:51 -0600 |
| commit | 44d424d22ddcd267dc5d4612f028f7aa4fb4fab3 (patch) | |
| tree | 67106800d6587b8c44a6b369930c40a1a1c78f28 /src/Q10 | |
| parent | 1f88dcd4120787c55933607c3280e880f5ff00db (diff) | |
add more documentation
Diffstat (limited to 'src/Q10')
| -rw-r--r-- | src/Q10/TaxReturn.java | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/Q10/TaxReturn.java b/src/Q10/TaxReturn.java index ceda632..7a9e32a 100644 --- a/src/Q10/TaxReturn.java +++ b/src/Q10/TaxReturn.java @@ -1,3 +1,11 @@ +/** + * Assignment 1, COMP268 Class: TaxReturn.java + * + * @description Represents a contact from an address book. + * @author: mo khan Student ID: 3431709 + * @date May 6, 2019 + * @version 1.0 + */ package Q10; import java.util.Scanner; @@ -17,6 +25,13 @@ public class TaxReturn { this(income, status, 0); } + /** + * Constructs a TaxReturn object for a given income and marital status and, and # of children. + * + * @param income the taxpayer income + * @param status either SINGLE or MARRIED + * @param children the number of children + */ public TaxReturn(double income, int status, int children) { this.income = income; this.status = status; @@ -24,6 +39,11 @@ public class TaxReturn { if (this.isSingle()) this.income -= children * 5000; } + /** + * Returns the calculated taxes to pay. + * + * @return the amount of tax to pay. + */ public double getTax() { double tax = 0; |
