diff options
| -rw-r--r-- | src/Q5/README.md | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/Q5/README.md b/src/Q5/README.md index ccd6af1..452fe19 100644 --- a/src/Q5/README.md +++ b/src/Q5/README.md @@ -4,6 +4,30 @@ Name: Mo Khan Student ID: 3431709 1. Problem Statement: + +```text +Create three classes: `Village`, `Citizen`, and `ComputeIntellect`. + +The Village class has an instance variable called `numberOfCitizens` and +an array that holds a maximum of 100 Citizen objects. + +The Citizen class has `citizenId` and `educationalQualification` as instance variables. + +The ComputeIntellect class has a `distributionOfQualification()` method. + +Create 100 Citizen objects using citizenId for the range [1 to 100]. + +Randomly generate the educational qualification in the range [1 to 4], where +1 = high school, +2 = undergraduate, +3 = postgraduate, +and 4 = doctorate. + +Store these 100 objects in a Village object using an array – any array of your choice. +The `distributionOfQualification()` method loops through the 100 objects and counts the +number of citizens corresponding to each of the four educational qualifications. +``` + 2. Description of the Code: 3. Errors and Warnings: 4. Sample Input and Output: |
