Question: 3. Design and implement the CityInfo class that matches with the following specification. The CityInfo is represented using city name, population and average annual household

3. Design and implement the CityInfo class that matches with the following specification. The CityInfo is represented using city name, population and average annual household income. It should have a constructor that takes all of the above three data members at the time of object creation. In addition to the constructor, the CityInfo class has following methods

setAnnualIncome : take number of new annual household income as a parameter and update average annual household income getPopulation : returns the name of the population toString : this method should return the name, population and annual household income

a) Draw the UML diagram that design the CityInfo class above

b) Implement CityInfo.java program

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!