Java

INDEPENDENT TOPIC 03 – ENUMs

 

LESSON WORK

 

 

QUESTION 0


List three types of information that could be represented as enums in Java.  Here are three examples:

 

Spells

  • Fireball
  • Lightning
  • Splash
  • Earthquake

 

Shape

  • Circle
  • Square
  • Rectangle
  • Triangle
  • Parallelogram

AIBehaviour

  • Random
  • Easy
  • Medium
  • Hard
  • Impossible

 

 

QUESTION 1

 

Create an enum type file in Java.  Then create a program that tests the enum. 

 

Note: The first example in the lesson does exactly this.  Of course, you need to create a different enum.