Question: Code in Python Requirement Important: The implementation should be based on the code shared in the attached slides. Any code implemented using external references is
Code in Python
Requirement Important: The implementation should be based on the code shared in the attached slides. Any code implemented using external references is not acceptable. The implementation should define the following classes: Node Class: o Fields: data, next o Methods: __init__(self, data), get_data(self), set_data(self, new_data), get_next(self), set_next(self, new_next), -_str__(self) Linked List Class: o Fields: head, o Methods: __init__(self), add(self, item), search(self, item), remove(self, item), size(self), is_empty(self), -_str__(self), append(self, item), insert(self, index, item), pop(self, index=None) The implementation should also include a main() method that creates a Singly Linked List object, calls its methods with appropriate sample data, and prints results of each key method. The program should call the main() method so it can be run as a standalone Python script
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
