I would use two classes:
Disk
Collection
Disk objects will contain the id, type (CD/DVD), title, a track listing, the artist's name, genre, length and status(rented, bad)
A Collection object will store Disk objects.
For Disk, there need to be operations to set, change, and get each of those fields.
For Collection, there needs to be an operation to add, search, remove Disk
Class diagrams:
DiskId : String
Type : String
Title : String
Tracks : String
Artist : String
Genre : String
Length : Double
Status:String
setId(Id:String):void
getId():String
setType(Type:String):void
getType():String
setTitle(Title:String):void
getTitle ():String
setTracks(Tracks:String):void
getTracks ():String
setArtist (Artist:String):void
getArtist():String
setGenre (Genre:String):void
getGenre ():String
setLength (Length:Double):void
getLength():Double
setStatus(Status:String):void
getStatus():String
Pseudocode: (of course it's always good to rewrite this in your own words.)
For the Disk class:
Class CD
Id as String
Type as String
Title as String
Tracks as String
Artist as String
Genre as String
Length as Double
Subprogram SetId(NewId)
Set Id = NewId
End Subprogram
Subprogram SetType(NewType)
Set Id = NewType
End Subprogram
Subprogram SetTitle(NewTitle)
Set Title = NewTitle
End Subprogram
Subprogram SetTracks(NewTracks)
Set Tracks = NewTracks
End Subprogram
Subprogram SetArtist(NewArtist)
Set Artist = NewArtist
End Subprogram
Subprogram SetGenre(NewGenre)
Set Genre = NewGenre
End Subprogram
Subprogram SetLength(NewLength)
Set Genre = NewLength
End Subprogram
Function GetId() As String
Set GetId = Id
End Function
Function GetType() As String
Set GetType = Type
End Function
Function GetTitle() As String
Set GetTitle = Title
End Function
Function GetTracks() As String
Set GetTracks = Tracks
End Function
Function GetArtist() As String
Set GetArtist = Artist
End Function
Function GetGenre() As String
Set GetGenre = Genre
End Function
Function GetLength() As Double
Set GetLenght = Lenght
End Function
End Class
For the Collection class:
Class Collection
D as Disk[100]
Subprogram AddDisk(NewDisk)
C.add(NewDisk)
End Subprogram
Subprogram RemoveDisk(BadDisk)
C.remove(BadDisk)
End Subprogram
Function SearchDisk(n) As Real
Set searchDisk = D[n]
End Function
End Class
GUI