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!

I need help writing a program for #1 in Java! 1. Design

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

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!