Question: I need JAVA code for the below assignment: Consider the management and maintenance of a library database in a certain school. It holds the information
I need JAVA code for the below assignment:
Consider the management and maintenance of a "library database" in a certain school. It holds the information of material resources in use for students in that school. This information is recorded based on the object-oriented design. The skeleton of the database structure is shown using the Unified Modeling Language (UML) diagramming method illustrated below. UML's standard notion is still being finalized for global use, and so annotations such as (has-a) to express object composition and (implements) to express inheritance are added to the diagram:

The above structure shows object variables and constructors only. Plus sign (+) indicates public visibility whereas minus sign (-) sets out private scope. The Database may use ArrayList instead of Array to hold the collection of Item's references. Add an appropriate set of overloading/overriding methods to support the object hierarchy assumed in this context. Implement the hierarchy, populate Database with at least two items per non-abstract class, and show the "unsorted" and "sorted" list of the set of those instances. The minimal requirement of this assignment is to realize the database sort based on the lexicographical order of id as well as any combination of data variables. For instance, database records are shown based on the lexicographical order of "title," followed by"addedOn," and followed by "director."
interface Comparable + Compare To) (implements) abstract Item Database - id: String - title: String - addedOn: Date (has-a) - item: Item + Database) + addltem(item: Item) + list0) + Item(id: String, title: String, addedOn: Date) (extends) abstracti MultiMedialtem Textbook - playingTime: integer + MultiMedialtem(id: String, title: String, addedOn: Date, playingTime: Integer) - author: Strin +Textbook(id: String, title: String, addedOn: Date, author: String) (extends) CD Video artist: Strin + CD(id: String, title: String, addedOn: Date, playingTime: integer,addedOn: Date, playingTime: integer, artist: String) - director: Strin + Video(id: String, title: String, director: String) interface Comparable + Compare To) (implements) abstract Item Database - id: String - title: String - addedOn: Date (has-a) - item: Item + Database) + addltem(item: Item) + list0) + Item(id: String, title: String, addedOn: Date) (extends) abstracti MultiMedialtem Textbook - playingTime: integer + MultiMedialtem(id: String, title: String, addedOn: Date, playingTime: Integer) - author: Strin +Textbook(id: String, title: String, addedOn: Date, author: String) (extends) CD Video artist: Strin + CD(id: String, title: String, addedOn: Date, playingTime: integer,addedOn: Date, playingTime: integer, artist: String) - director: Strin + Video(id: String, title: String, director: String)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
