Answered You can hire a professional tutor to get the answer.
You have a sizeable collection of music (CD or Cassette) and videos (DVD or VHS),and you want to develop a database to store, access and process this...
You have a sizeable collection of music (CD or Cassette) and videos (DVD or VHS),and you want to develop a database to store, access and process this collection. You first need toimplement a class hierarchy for your media to help implementing the database. You also have adata file (text file) that contains the information on your media (see details of the file format below.)You want to be able to insert new media entries, look up a media by title or remove a media givenits title. You also want to save any changes to your data file. You will implement a media databaseby the help of a Single Linked List. In other words, you will be storing your Media objects in aSingle Linked List. Use the SLList class we have covered in class. Add any methods to that classthat you find necessary.Details of the Implementation: Your program first should load the data file into the mediadatabase (Single Linked List). Then you should display a simple menu (GUI or text-based) whichasks the user what operation to perform and take action according to the user input (Partial code isgiven in MDConsoleIO.java). Appropriate output should be displayed.(1) Media Class Hierarchy: Implement the classes as described in Chapter 1, Programming Project5 (pg. 56, 57 of KW textbook.) Note that the Media, Audio, and Video classes are abstract classes.You are required to include instance variables and methods given in Fig 1.12 and any othervariables/methods you find necessary for the classes Media, Video, DVD and VHS. For theremaining classes (Audio, Cassette, CD), determine your own instance variables and methods. TheplayMedia() method should display: ”Now playing: ” followed by the title and all other informationregarding that media. It should also increment the number of plays. Test all your classes before youproceed.(2) Download MediaDatabase.java, LinkedListMediaDatabase.java and MDConsoleIO.java. Youwill complete the class LinkedListMediaDatabase by implementing the methods in the MediaDatabase.java.(3) Study the partially given MDConsoleIO.java and see how the user interface works. Completethe methods that are left blank.(4) MediaDatabase Interface specifies which methods to be implemented byLinkedListMedia-Database, the parameters and what needs to be returned by each method. Followthe requirements. The following operations has to be implemented. 1 void loadData(String sourceName): Loads the data file into the media database. The nameof the data file is given by sourceName.2 void addEntry(Media newMedia): Adds a new entry. If the given title already exists in thedatabase, print an appropriate message and do not insert the new entry.3 Media lookupByTitle(String title): Searches the database for the given title and returns theassociated media object. Returns null if title is not found.4 Media removeEntry(String title): Removes the entry with the specified title from thedatabase and returns the associated media object or null if not in the database.5 void save(): Writes the contents of the database of entries to the same data file you used forloading entries initially.Input/Output Requirements:1. Input: The data file. In the text file, the specification for each media object starts with themedia type (one of ”Cassette”, ”CD”, ”VHS” or ”DVD”). This is followed by each datamember for that type. Each data member will be read from a separate line of the text file. Forarray type data members, e.g. supportingActors, first the number of supportingActors is givenfollowed by that many supportingActors—one per line. For example, an example entry for aDVD is as follows:DVDMatrixKeanu Reeves13602 //number of supporting actorsLaurence FishburneCarrie-Anne MossWachowskiHD0 //number of special featuresTRUETRUE0 //number of soundOptionsSubmit an example text file of your collection with your code submission.1 Additional entries: If the user wants to insert new entries, each new entry is typed by theuser at the keyboard when requested.2 Output: Each media entry will be written to the data file in the same format as the input.2