From a76b31a8639190c6e98fefc0e62e42b937501f94 Mon Sep 17 00:00:00 2001 From: mo Date: Sat, 13 Jul 2019 13:55:21 -0600 Subject: add description of the code --- src/Q5/ComputeIntellect.java | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'src/Q5/ComputeIntellect.java') diff --git a/src/Q5/ComputeIntellect.java b/src/Q5/ComputeIntellect.java index 0ebf614..68db941 100644 --- a/src/Q5/ComputeIntellect.java +++ b/src/Q5/ComputeIntellect.java @@ -53,11 +53,9 @@ public class ComputeIntellect { return this.undergraduate; } - /** - * Tallys the # of citizens with different educational qualifications. - */ + /** Tallys the # of citizens with different educational qualifications. */ public void distributionOfQualification(Citizen[] citizens) { - for (Citizen citizen : citizens) { + for (Citizen citizen : citizens) switch (citizen.getEducationalQualification()) { case Citizen.DOCTORATE: this.doctorate++; @@ -72,6 +70,5 @@ public class ComputeIntellect { this.highschool++; break; } - } } } -- cgit v1.2.3