Question: I need help writing a program for #1 in Java! 1. Design a class named MyInteger. Below is the UML of class MyInteger. - Write
I need help writing a program for #1 in Java!

1. Design a class named MyInteger. Below is the UML of class MyInteger. - Write a test program to create some MyInteger instances, and test all methods defined in the class. MyInteger -value: int +MyInteger(value:int) Constructor +MyInteger(strVal: String) Constructor, create instance from a string +getValue(): int Return "value" +isEven() : boolean Check if value is even +isOdd (): boolean Check if value is odd +isPrime(): boolean Check if value is a prime number +isEven(value: int) : boolean Check if input argument is even +isOdd (value: int) : boolean Check if input argument is odd +isPrime(value: int) : boolean Check if input argument is a prime number +equals(value: int) : boolean Check if the input argument equals to value +equals(myInt: MyInteger) : boolean Check if the input argument equals this instance
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
