Question: Please do this in JAVA [20 marks] Create three classes: Village, Citizen, and ComputeIntellect. The Village class has an instance variable called numberOfCitizens and an

 Please do this in JAVA [20 marks] 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

Please do this in JAVA

[20 marks] 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.

ComputeIntellect a Attributes + int doctorate + int highschool + int postgraduate + int undergraduate + static final int DOCTORATE + static final int HIGH_SCHOOL + static final int POSTGRADUATE + static final int UNDERGRADUATE Operations + public void distributionOfQualification (Citizen[] citizens)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!