Advanced Topic: Static Identifier

The Static Specifier

foxtrot.100.in.binary

NOTE: use the implementation already written from the previous assignment but pay attention to the changes.
(The YI_MyStaticInteger class) Design a class named MyInteger. The class contains:
■ A static int data field named intCount that stores the number of object of this class created in the driver.
■ An int data field named value that stores the int value represented by this object.
■ A constructor that creates a MyStaticInteger object for the specified int value and updates the intCount data field.
■ A get method that returns the int value.
■ A get method that returns the int intCount.
■ The methods isEven(), isOdd(), and isPrime() that return true if the value in this object is even, odd, or prime, respectively.
■ The static methods isSEven(), isSOdd(), and isSPrime() that return true if the value in this object is even, odd, or prime, respectively. Comment out the code that causes any problem to be able to continue successfully with the implementation.
■ Compare the last two methods behaviors and explain the differences.
■ Report any problems and messages as comments and explain what the problem is. If you can’t figure it out, watch yesterday’s video again.
■ The static method getintCount() should be part of the class and used in the driver to display the number of object of MyStaticInteger class.