Professional Documents
Culture Documents
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