diff options
| author | mo <mo.khan@gmail.com> | 2019-07-07 16:02:39 -0600 |
|---|---|---|
| committer | mo <mo.khan@gmail.com> | 2019-07-07 16:02:39 -0600 |
| commit | 8b59d4e67e1d56cc1712307bf6436352419e13f7 (patch) | |
| tree | bd364b86dc2c73ef993fbd39ed8652a89cca779d /src/Q5 | |
| parent | 2191a1db67940fff28b4c1b5d49e9a2693a83a48 (diff) | |
add problem statement
Diffstat (limited to 'src/Q5')
| -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: |
