Question: Design and write a Java class named Myinteger (MyInteger.irva) containing: An int data field named value that stores the int value represented by this object.
Design and write a Java class named Myinteger (MyInteger.irva) containing: An int data field named value that stores the int value represented by this object. A no-arg constructor that creates a MyInteger object for the int value zero. A constructor that creates a MyInteger object for the given int value. A getter method (getInt) that returns the int value. A setter method (setInt) that sets the int value. The methods isEvent) and isOdd) that return true if the value in this object is even or odd, respectively . The static methods isEvenint) and isOdde int that return true if the specified value is even or odd, respectively. The static methods isEventMyInteger) und isOddi MyInteger) that return true if the specified value is even or odd. respectively, The methods equals(int) and equals Myluteger that return true if the value in this objea is equal to the specified value The methods greater'fhankint) and greater Than My Integer) that return true if ibe value in this object is greater than the specified value. The methods samller Thun (int) and smaller than(MyInteger) that return true if the value in this object is smaller than the specified value Write a testing Java application (ty Integer I STAVA) that tests all the constructors and methods mentioned abwe Deliverable Submit the following filetsy on the Blackboard Msinteserva Mvinteger l'estjava
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
