Consider the case of a shop that sells CDs in cash. The CDs are of three types: Movie CDs, Software CDs and Music CDs. For each of the following CD types, the required attributes are:Movie CD: Movie Title, Year of Release, Lead Actor Name, CD price and CD quantitySoftware CD: Software Name, Edition, Year of Release, CD price and CD quantityMusic CD: Album Title, Year of Release, Number of Songs, Format, CD price and CD quantity.
Write a java statement to declare a list(you may follow any) of type CD and instantiate usingHashSet to avoid duplicate entries. Does detecting the same entry requires any method overriding? Apply sorting on the year of release.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here