Answered You can hire a professional tutor to get the answer.

QUESTION

Create a n enum Direction: Create an enum in the edu.waketech.ccave.common package called Direction . This enum has the following values: N, S, E, W,...

Create a

n enum Direction:

1: Create an enum in the edu.waketech.ccave.common package called Direction. This enum has the following values: N, S, E, W, NE, NW, SE, SW, UP, DOWN, UNKNOWN.

2: In the resources directory, create a properties file for each direction except UNKNOWN. For example, resources will contain a file n.properties. This file will contain a series of synonyms for Direction.N, where the property key is meaningless and the property value is a synonym for N, for example, "north". So n.properties would have at least one line

n=north

A properties file may contain more than one synonym. For example, in the properties file for Direction.UP (up.properties) you wish to define

up=u

up1=higher

Note that even though we don't care about the keys in the properties file, they have to be unique.

At a minimum, define long forms for each direction:

enum valuelong form synonymNnorthSsouthEeastWwestNWnorthwestNEnortheastSWsouthwestSEsoutheastUPuDOWNdYou may add other synonyms as you wish.

Show more
LEARN MORE EFFECTIVELY AND GET BETTER GRADES!
Ask a Question