[Solved]Question 2 30 Points Intnode Data Int Intnode Link Intnode Data Int Intnode Link Question Q37116178

Question 2 (30 Points): IntNode -data:int IntNode:link +IntNode(data:int, IntNode link) In this question, you can use any method from the IntNode class that is represented by the following UML: +getlink):IntNode +setLink(nextNode: IntNode):void +getDataO:int +setDataCelement:int):void +addNodeAfter(element:int):void +removeNodeAfterO:void IntNode +listPositionChead Int Node.position:int: IntNode (10 Points) Implement a method called split that takes one input of type IntNode that represents the head of a linked list that includes positive numbers. The method then splits the input list into two lists, evenList and oddList where evenList includes all even numbers in the input list while oddList includes all the odd numbers in the input list. The method returns as output an array that includes two reference variables that represent the head nodes of evenList and oddList. Show transcribed image text Question 2 (30 Points): IntNode -data:int IntNode:link +IntNode(data:int, IntNode link) In this question, you can use any method from the IntNode class that is represented by the following UML: +getlink):IntNode +setLink(nextNode: IntNode):void +getDataO:int +setDataCelement:int):void +addNodeAfter(element:int):void +removeNodeAfterO:void IntNode +listPositionChead Int Node.position:int: IntNode
(10 Points) Implement a method called split that takes one input of type IntNode that represents the head of a linked list that includes positive numbers. The method then splits the input list into two lists, evenList and oddList where evenList includes all even numbers in the input list while oddList includes all the odd numbers in the input list. The method returns as output an array that includes two reference variables that represent the head nodes of evenList and oddList.
Expert Answer
Answer to Question 2 (30 Points): IntNode -data:int IntNode:link +IntNode(data:int, IntNode link) In this question, you can use an… . . .
OR

