Question: a library system where i can add and remove items from it. Must be made in python language with linked list and nodes. Your program
a library system where i can add and remove items from it. Must be made in python language with linked list and nodes.
Your program need to fulfil this requirements:
AddsongToFront(newSong) : This method will create a new Node with the new Song object as its data value and then add the newly created node to the front of the linked list.
AddSongAtPosition(newSong, x) : This method will create a new Node with the new Song object as its data value and then add the newly created node at position n of the linked list. Assume that the first node of the linked list has a position number of 0 and the second node has a position number of 1 and so on.
RemoveSongAtPosition(x): This method will remove the node at position n in the linked list. Assume that the first node of the linked list has a position number of 0 and the second node has a position number of 1 and so on.
DisplaySong(): This method will traverse the linked list from its first node to its last node and print the data value (i.e., the id, songName and artistName of the Song object) of each node.
SortByArtistName(): This method will sort the linked list by the song authors name in ascending order.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
