From e5aefc5e25159ad6f8ce2a08e754b8ed2f5c546f Mon Sep 17 00:00:00 2001 From: mo Date: Sat, 13 Jul 2019 13:51:47 -0600 Subject: add documentation --- src/Q5/ComputeIntellect.java | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to 'src/Q5/ComputeIntellect.java') 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()) { -- cgit v1.2.3