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

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
To complete the State enum with constructors and getter methods you need to define two constructors ... View full answer
Get step-by-step solutions from verified subject matter experts
