Question: You are expected to write JUnit Unit Tests for your homework assignments. While you are encouraged to use TDD , you are not required to
You are expected to write JUnit Unit Tests for your homework assignments. While you are encouraged to use TDD you are not required to You may use "test last coding" instead. However, you are expected to have tests for any code that is outside of a main method.
Begin by copying the classes from your activities package into your homework package. You will be using the interfaces and classes that you wrote during class to complete this homework.
Yes, the Pokmon are back but don't worry, they are simpler now Write a class called Pokemon that has a name eg "Pikachu" and a number eg
a Implement a constructor that takes both values as parameters.
b Implement accessors for both values.
c Implement a toString that returns a string in the format "Namenumber eg "Pikachu
d Implement an equalsObject method two Pokmon are considered equal if they have the same number
e Implement a hashCode method that returns the number. We won't be using this, but it's a good idea to get into the habit of overriding the hashCode method any time your override equalsObjectremember the equals and hashCode contract
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
