Question: Close Lab 3: Create and use a class: myinteger Problem Description Design a class naned Myinteger The class contains data tieid naned ue that stores
Close Lab 3: Create and use a class: myinteger Problem Description Design a class naned Myinteger The class contains data tieid naned ue that stores the int value represented by this object A consteuctor that creates a MyInteger objeet for the specified value .A get method that returns the int value Hethods LsEveall. Laodal, and istunee that return gru it the value is even, odd, or peime, respectively Statie nethods IsEven (nt) that return true iE the speeified value is even, odd pzLne, respectively Static methods in 1sodd int) and isPrinetnt) Pr ime Myinteges) that return Srue if the specifled value evenodd or peine, respectively Methods equalo(intl and equals(MyInteger) that return . A statle method parseInt(chaell that converts an azray of .A static method parneInt String), that converts a atring into the value in the object is equal to the specifled value an int value. Deaw the UML diagzan for the elass. Isplement the elass Welte a cllent progzam that teats all methods in the elass Design Draw the UML class ddagram here Mylategar Codng (main testing part peovided) pblie elass Exereise10 03 yaten.out-printin "nl s pine?mi.iD chaz11 chars-3 yatem out.printin(Myinteger-parsetot (chara) 353 Systen.ovt.println(Mytegee part) Myinteger n2 out-printin Systen.ovt,printin 4.45 is 0dd? * + MyIMeper.80dd(45)> Systemovt.peiotlatnl s equal to 27 +n.equaletn21 ystem,ovt.peintint-nl is equal to Stnl equals i5 Inplenent your olass here Submisuion Follow our class coding standard to complete this lab, chock out for credit
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
