Question: *use oracle Junit testing for this please **** You are currently developinga system that requires a class to convert an integer to the name of

*use oracle Junit testing for this please ****

You are currently developinga system that requires a class to convert an integer to the name of the day of the week.For example, 0would be Sunday, 1would be Monday, and so on.Create aclass called Week.java that will represent the class for days ofthe week.It is a simple class it contains one method called getDayOfWeek()and takes an integer. For example, getDayOfWeek(0)would return Sunday.How you design this class is up to you.When you develop the unit tests, try your hand at TDD by creating the unit tests first, running the failing test, developing the class code, and then creating the passing test.Yourtask is towrite the sourcecode(Week.java), and design, implement, and execute passing JUnit unit tests for the Week.java. Create a new project in Eclipse called Project 6. Create a class called Week.java in your srcdirectory. Create a new directory called test to hold your JUnit VERSION 3(not VERSION 4) unit tests.When you create the JUnit test, dont forget to check the box for Version 3.Lets call this test class DayOfWeekTest.java.

C.

Try misspelling a day of the week or entering an integer that is not in the switch statement;

does the test fail?

No need to take screenshots here

just practice making a test f

ail to see

what happens.

D.

In the

Week

.java file create a single method called getDayOfWeek()

that returns a

String

(a week day)

and takes a

integer (use Sunday as day zero, Monday as day one, etc)

.

E.

Use a switch statement to implement the

day of the week values (i.e. Sunday, Monday,

etc.)

.

Switch

statements are quite easy to understand and, you may already have had

some

experience with other languages

that use

case/switch statements. For more information on

the Java switch statement please turn your attention to the following site by Oracle:

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!