Question: solve it using java Part # 1 : Write a method called insertRange to be included in class SingleLinkedList ( without calling any other method

solve it using java
Part #1: Write a method called insertRange to be included in class SingleLinkedList (without calling any other method) to insert a data newltem in linked list as follows:
(a) If the list is empty, do not insert any node and return false.
(b) If the insertRange is between 10 and 100 then insert a new node having newltem of the node, at the beginning of the list and return true.
(c) If the insertRange is not between 10 and 100 then do not insert any node and return false.
Function Prototype:
bool insertRange (const Type& newltem);
Part #2: Write a class called Test insertRange having main method to test the application. In main method create following:
1- Object of type SingleLinkedList group.
2- Add the following data to group (1212,2,5,9,4).
3- Test the insertRange by adding number 15.
Example#1:
Insert the group items =12,2,5,9,4
Insert the new item =17
q,
The new group item =17,12,5,9,4
Example#2:
Insert the group items =12,2,5,9,4
Insert the new item =8
The new group item is not in the range.
 solve it using java Part #1: Write a method called insertRange

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!