Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Basics Computer EngineeringInformation Warehouse Basics From Science

Authors: Odiljon Jakbarov ,Anvarkhan Majidov

1st Edition

620675183X, 978-6206751830

More Books

Students also viewed these Databases questions