+1 714-215-3097

(Solved) : Use Oracle Junit Testing Please Currently Developinga System Requires Class Convert Intege Q35630578

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

You are currently developinga system that requires a class toconvert an integer to the name of the day of the week.For example,0would be “Sunday”, 1would be “Monday”, and so on.Create aclasscalled “” that will represent the class for days oftheweek.It is a simple class –it contains one method calledgetDayOfWeek()and takes an integer. For example,getDayOfWeek(0)would return “Sunday”.How you design this class isup to you.When you develop the unit tests, try your hand at TDD bycreating the unit tests first, running the failing test, developingthe class code, and then creating the passing test.Yourtask istowrite the sourcecode(, and design, implement, andexecute passing JUnit unit tests for the Create a newproject in Eclipse called “Project 6”. Create a class called“” in your “src”directory. Create a new directory called“test” to hold your JUnit VERSION 3(not VERSION 4) unit tests.Whenyou create the JUnit test, don’t forget to check the box forVersion 3.Let’s call this test class “”.


Try misspelling a day of the week or entering an integer that isnot 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.


In the


.java file create a single method called getDayOfWeek()

that returns a


(a week day)

and takes a

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



Use a switch statement to implement the

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




statements are quite easy to understand and, you may alreadyhave had


experience with other languages

that use

case/switch statements. For more information on

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

Leave a Reply

Your email address will not be published. Required fields are marked *