Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This Program needs to be Written in Java. Thank you so much! I need help constructing the following classes. It would be a great help

This Program needs to be Written in Java. Thank you so much!

I need help constructing the following classes. It would be a great help if you can describe what you did so I can understand it fully. Thank you so much!

image text in transcribed

The classes Media, Audio and Video would be abstract classes, as one would not instantiate objects of those types. The class Artist is used to describe artists of any kind from producers, directors, band members or movie actors. While is-a inheritance is shown through the specialization hierarchy of Media, Audio, Video, Cd, and DVD; has-a relationship is shown through the class Artist with Media, Audio, and Video all having Artists as data members. It might be necessary to create other methods for any of the classes. The toString methods should return a String containing all of the data members for the particular media. The playMedia methods should display Now playing: followed by the medias title and playtime if it is an Audio and if it is a Video, followed by title, playing Time and rating. It should also increment the number of plays. Your application class should be able to Create Cds and DVDs List all of the media in your collection (Title, media type and Number of plays only) List all of the data for a particular Media List all of the data elements for the major artist of a particular media Play a particular Media List the number of plays for a particular media You should create a collection of Artists and an Artist should appear in the collection only once regardless of how many of his/her CDs or DVDs you may have.

You have a sizable collection of music and videos and want to develop a database for storing and processing information about this collection. You need to develop a class hierarchy for your media collection that will be helpful in designing the database. Consider: Media title majorArtist playingTime num Plays play Media getTitle() getNum Plays() getPlayingTime() getMajorArtist() toString() Artist Video Audio last supportingactorsD -groupMembersO first num Actors num Members o birthdate director producer -twitter handle rating +play Media() url +play Media() +toString() +toString() +toString() DVD special FeaturesO num Features CD wide ScreenFormat tracks[] TVFormat -num Tracks sound Options[] +play Media() numSound Options +toString() +play Media +toString()

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

Spomenik Monument Database

Authors: Donald Niebyl, FUEL, Damon Murray, Stephen Sorrell

1st Edition

0995745536, 978-0995745537

More Books

Students also viewed these Databases questions

Question

Patients are kept waiting two hours for appointments.

Answered: 1 week ago