Question: Write a program that uses Enumerated Types fields and constructor, and prints the fields for each constant in the enum. E.g., enum Company { COMPANY1(10),

Write a program that uses Enumerated Types fields and constructor, and prints the fields for each constant in the enum.

E.g., enum Company { COMPANY1(10), COMPANY2(20), COMPANY3(100) };

Output:

Company1 has 10 employees.

Company2 has 20 employees.

Company3 has 100 employees.

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!