You are on page 1of 3

CS111IntroductiontoDataStructures

OutsideProgrammingAssignmentII
Due:AtthestartofclassTues.October21,2014

Youhaveasizablecollectionofmusicandvideosandwanttodevelopadatabaseforstoringand
processinginformationaboutthiscollection.Youneedtodevelopaclasshierarchyforyourmedia
collectionthatwillbehelpfulindesigningthedatabase.Consider:

TheclassesMedia,AudioandVideowouldbeabstractclassesasonewouldnotinstantiateobjectsof
thosetypes.TheclassArtistisusedtodescribeartistsofanykindfromproducers,directors,band
membersormovieactors.WhileisainheritanceisshouldthroughthespecializationhierarchyofMedia,
Audio,Video,Cassettes,Cd,DVD,VHS;hasarelationshipisshownthroughtheclassArtistwithMedia,
Audio,andVideoallhavingArtistsasdatamembers.Itmightbenecessarytocreateothermethodsfor
anyoftheclasses.

ThetoStringmethodsshouldreturnaStringcontainingallofthedatamembersfortheparticularmedia.
TheplayMediamethodsshoulddisplayNowplaying:followedbythemediastitleandplaytimeifitsan
AudioandifitsaVideoitshouldbefollowedbytitle,playingTimeandrating.Itshouldalsoincrement
thenumberofplays.

Yourapplicationclassshouldbeableto

CreateCassettes,Cds,DVDs,andVHS

Listallofthemediainyourcollection(Title,mediatypeandNumberofplaysonly)

ListallofthedataforaparticularMedia

Listallofthedataelementsforthemajorartistofaparticularmedia

YouaretoJavaDocallmethodsintheclassMediaonly!Inadditiontoturninginagnulistprintoutofall
classesinyoursolution,youaretoruntheJavaDocprocessoronyourcodeandturninitsprintoutas
well.Youarealsotoemailallofyourclasses(includingyourapplicationclass)toyourlabinstructor(and
onlyyourlabinstructor).Usethesubjectline
CS111-Olab2-Sec? yourMasterID.

Media

MediaApp

Artist

ListArtist

getTitle

title

findTtile

ToString

artistinfo
user

SequenceDiagramtoDisplayallinfoonArtist

You might also like