Question: help me solve this java problem. thanks. Design a class named MyInteger. The class contains: An int data field named value that stores the int

help me solve this java problem. thanks.

help me solve this java problem. thanks. Design a class named MyInteger.

Design a class named MyInteger. The class contains: An int data field named value that stores the int value represented by this object . A constructor that reates a MyInteger object for the specified int value . A get method that returns the int value . Methods isEvenisodd and isPrime( that return true if the value is even, odd, or prime, respectively . Static methods isEven (int), isodd(inti, and isprime (intl that return true if the specified value is even, odd, or prime, respectively Static methods isEven (MyInteger, isOdd (MyInteger), and isPrime (MyInteqger) that return true if the specified value is even, oda, or prime, respectively . Methods equals(int) and equals (MyInteger)l that return true if the value in the object is equal to the specified value A static method parseInt (char numeric characters to an int value that converts an array of . A static method parseint (String) that converts a string into an int value Draw the UML diagram for the class. Implement the class Write a client program that tests all methods in the class Design: Draw the UML class diagram here Mylnteger Coding: (main testing part provided) public class Exerciseld 03 ( public static void main (String[ args) MyInteger nl new MyInteger(5) System.out.println ("nl is even? n1.isEven)) System.out.println ("nl is prime?"+nl.isPrime ) System.out.println("15 is prine? "MyInteger.isPrime(15)) char [ ] chars { . 3 . System.out.println (MyInteger.parseInt (chars)) String S"3539" System.out.println (MyInteger.parseInt(s) MyInteger n2 new MyInteger (24) System.out.println ("n2 is odd?"+n2.isodd) System.out.println("45 is odd?"+MyInteger.isodd (45)) System.out.println ("nl is equal to n2? "nl.equals (n2)) System.out.println ("nl is equal to 5?n1.equals (5)) class MyInteger Implenent your class here

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!