Loading

Java - CMIS242 - (The My Integer class) Design a class named My Integer. The class contains: An int data field named value that stores the int value represented by this object. A constructor that creates a My Integer object for the specified int value. Pr

Availability: In stock

$5.00
Already Bought 4 times.

Java - CMIS242 - (The My Integer class) Design a class named My Integer. The class contains: An int data field named value that stores the int value represented by this object. A constructor that creates a My Integer object for the specified int value. Pr

Double click on above image to view full picture

Zoom Out
Zoom In

More Views

Quick Overview

(The My Integer class) Design a class named My Integer. The class contains:


An int data field named value that stores the int value represented by this object


A constructor that creates a My Integer object for the specified int value


A get method that returns the int value


Methods isEven( ), isOdd() and isPrime() that return true if the value is even, odd or prime respectively


Static methods isEven(int), isOdd(int) and isPrime(int) that return true if the specified value is even, odd or prime respectively.


Static method isEven(MyInteger), isOdd(MyInteger) and isPrime(MyInteger) that return true if the specified value is even, odd or prime respectively.


Methods equals(int) and equals(MyInteger) that return true if the value in the object is equal to the specified value


A static method parseInt(char[]) that converts an array of numeric characters to an int value


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 the methods in the class.


Make sure to use your IDE to properly indent your code, remove generated comments that do not apply to the code, have a header that clearly states your name, the purpose of the work


Provide a screenshot of your IDE running your test program in debug mode, stopped on a breakpoint set in the instance method isPrime(), and attach your 2 files named MyInteger.java and TestMyInteger.java to your posting.


 


 

$5.00

Details

(The My Integer class) Design a class named My Integer. The class contains:

An int data field named value that stores the int value represented by this object

A constructor that creates a My Integer object for the specified int value

A get method that returns the int value

Methods isEven( ), isOdd() and isPrime() that return true if the value is even, odd or prime respectively

Static methods isEven(int), isOdd(int) and isPrime(int) that return true if the specified value is even, odd or prime respectively.

Static method isEven(MyInteger), isOdd(MyInteger) and isPrime(MyInteger) that return true if the specified value is even, odd or prime respectively.

Methods equals(int) and equals(MyInteger) that return true if the value in the object is equal to the specified value

A static method parseInt(char[]) that converts an array of numeric characters to an int value

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 the methods in the class.

Make sure to use your IDE to properly indent your code, remove generated comments that do not apply to the code, have a header that clearly states your name, the purpose of the work

Provide a screenshot of your IDE running your test program in debug mode, stopped on a breakpoint set in the instance method isPrime(), and attach your 2 files named MyInteger.java and TestMyInteger.java to your posting.

 

 

Additional Information

Programming Language Java

Product Tags

Use spaces to separate tags. Use single quotes (') for phrases.