diff options
Diffstat (limited to 'src/Q5/ComputeIntellect.java')
| -rw-r--r-- | src/Q5/ComputeIntellect.java | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/src/Q5/ComputeIntellect.java b/src/Q5/ComputeIntellect.java index d8a7ee7..0ebf614 100644 --- a/src/Q5/ComputeIntellect.java +++ b/src/Q5/ComputeIntellect.java @@ -1,3 +1,11 @@ +/** + * Assignment 2, COMP268 Class: ComputeIntellect.java + * + * @description A class that can be used to tally the intellect of citizens + * @author: mo khan Student ID: 3431709 + * @date Jul 13, 2019 + * @version 1.0 + */ package Q5; import java.io.*; @@ -9,22 +17,45 @@ public class ComputeIntellect { private int postgraduate = 0; private int undergraduate = 0; + /** + * Returns the total # of citizens with a doctorate. + * + * @return # of citizens with a doctorate + */ public int getDoctorate() { return this.doctorate; } + /** + * Returns the total # of citizens with a high school diploma. + * + * @return # of citizens with a high school diploma. + */ public int getHighschool() { return this.highschool; } + /** + * Returns the total # of citizens with a post graduate degree. + * + * @return # of citizens with a post graduate degree. + */ public int getPostgraduate() { return this.postgraduate; } + /** + * Returns the total # of citizens with an under graduate degree. + * + * @return # of citizens with an under graduate degree. + */ public int getUndergraduate() { return this.undergraduate; } + /** + * Tallys the # of citizens with different educational qualifications. + */ public void distributionOfQualification(Citizen[] citizens) { for (Citizen citizen : citizens) { switch (citizen.getEducationalQualification()) { |
