Question: Complete the following enum called State. Each State will have a name, a capital, and a population value. If the population is not passed to

 Complete the following enum called State. Each State will have a

Complete the following enum called State. Each State will have a name, a capital, and a population value. If the population is not passed to the constructor, the latter sets it at zero. Include all necessary constructors and getter methods. public enum State { MA ("Massachusetts", "Boston", 6890000), MI ("Michigan", "Detroit", 9980000), FL ("Florida", "Tallahassee"), NY ("New York", "New York City", 19450000), OH("Ohio", "Columbus"); private final String name; private final String capital; private final double population

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!