Write a complete program with an enum Coin whose constants carry their value in cents: PENNY(1), NICKEL(5), DIME(10), QUARTER(25). Give it a field, a constructor and a getter.
Read a count and then that many coin names. Print the total value, then how many kinds of coin the enum has.
For 3 then QUARTER DIME PENNY:
36
4
Coin.valueOf(name) turns the text into a constant, and Coin.values().length counts them.