Question: Project 2 -Linked List 1. Design a java interface called IDedobject which has following abstract functions. int getID() //Returns the ID of the object //Prints

 Project 2 -Linked List 1. Design a java interface called IDedobjectwhich has following abstract functions. int getID() //Returns the ID of the

Project 2 -Linked List 1. Design a java interface called IDedobject which has following abstract functions. int getID() //Returns the ID of the object //Prints the details of the ID void printID0 Design a java class Magazine that implements IDedobject interface and has the following class variables: int magazinelD String magazineName String publisherName Implement suitable constructors, a printID function that prints all the variable values in separate lines and getID0 function that returns the magazinelD. Add any access and other functions necessary HNote all your data should be private and methods public inside the class) 3. Design a generic singly linked list java class (Give an appropriate name) to hold objects of the generic type KAnytype This AnyType should extend IDedobject. The linked list class must implement following member functions: A constructor which generates an empty list //empties the linked list void makeEmpty(); Any Type findID(int ID) Get the generic type to get the particular id and returns AnyType. Don't remove the object from the list. returns null if the list is empty or ID not found. boolean insertAtFront( x); insert at front of list or return false if that ID already exists Any Type deleteFromFront(); delete and return the record at the front of the list or return null if the list is empty find and delete the record with the given ID or returns Any Type delete (int ID); null if it isn't found void printAllRecords(); print all elements in the order they appear in the linked list. if list is empty print appropriate message

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!