Question: in java please 2. Create class MyInteger and a testing class that test every single method in the class -value: int An int value for

 in java please 2. Create class MyInteger and a testing class

in java please

2. Create class MyInteger and a testing class that test every single method in the class -value: int An int value for the object. +MyInteger value: int) +get Value0: int +isPrime(): boolean +isPrime(value: int): boolean +isPrime(value: MyInteger): boolean +isEven): boolcan +isEven(valuc: int): boolcan +isEven(value: Mylnteger): boolean +isOddO: boolean +isOdd (value: int): boolean tisOdd(value: Mylnteger): boolean +equals(anotherValue: int): boolean +equals(anotherValue: Myln teger): boolean Constructs a Myinteger object with the specified int value. Returns the value in this object. Returns true if the value in this object is prime. Returns true if a specified int value is prime. Returns true if the value in a specified Myinteger object is prime. Returns true if the value in this object is even. Rcturns true if a specified int value is even Returns true if the value in a specified MyInteger object is even. Returns true if the value in this object is odd. Returns true if a specified int value is odd. Returns true if the value in a specified Mylnteger object is odd. Returns true if a specified int value is equal to the value in this object Returns true if the value in a specified Mylnteger object is equal to the value in this object. Returns the int valuc for the specified string. +parselnt(value: String): int 3. Create class MyRectangle2D and a testing class that tests every single method -x: doublc y: double -width: double -height: double + MyRectangle2DO +MyRectangle2D(x: double, y: double, width: double,height: double +getXO: double +setX(x: double): void tgetYO:double setY(y: double): void get Width0: double + set Width(width: double): void tgetHeightO: double +setHeight(height: double): void + getRadius): double t getPerimeter): double getArea): double +contains( x: double, y: double): boolean +contains(r: Rectangle2D): Boolean Return true if the specified point is in the rectangle Returns true if Rectanble2D object is inside rectangle of this object Returns true if Rectanble2D object overlaps with rectangle of this object toverlaps(r: Rectangle2D); boolean

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!