Question

Build class TreeOfLists which will use class Tree, and class Doublylikedlist. You should notchange these two classes, where class Tree has only the public methods: insert, search, delete,and traverse. The

class DoublyLinkedlist has the public methods: first, last, isEmpty, size,addFirst, addLast, removeFirst, removeLast. 1)delete(int id ): it deletes the students with the input id and returns true, or returns false if there is no students with that id. If that student is the only one in that node, then node should be also deleted. 2)Pirn tStudents: which prints all students (ids and names), the students should be printed base don their years of admissions in an ascending order, for example first print all students who were admitted in 2017, then 2018, ...etc. You need to add method to String to class Doubly Linked list that returns a string represents data of each object in the list,

Fig: 1

Fig: 2

Fig: 3