Ejemplo n.º 1
0
 // Precondition:  theCopyrightYear >= 0 and theLoanPeriod >= 0 and
 //                theMedium from { DVD, BLURAY, VHS } and theDuration >= 0
 // Postcondition: A library movie has been created with the specified
 //                values for title, publisher, copyright year, loan period,
 //                call number, duration, director, medium, and rating. The
 //                item is not checked out.
 //                The movie has been added to the Library.
 public void AddLibraryMovie(String theTitle, String thePublisher, int theCopyrightYear,
     int theLoanPeriod, String theCallNumber, double theDuration, String theDirector,
     LibraryMediaItem.MediaType theMedium, LibraryMovie.MPAARatings theRating)
 {
     _items.Add(new LibraryMovie(theTitle, thePublisher, theCopyrightYear, theLoanPeriod,
         theCallNumber, theDuration, theDirector, theMedium, theRating));
 }
Ejemplo n.º 2
0
 // Precondition:  theCopyrightYear >= 0 and theLoanPeriod >= 0 and
 //                theMedium from { CD, SACD, VINYL } and theDuration >= 0 and
 //                theNumTracks >= 0
 // Postcondition: A library music item has been created with the specified
 //                values for title, publisher, copyright year, loan period,
 //                call number, duration, director, medium, and rating. The
 //                item is not checked out.
 //                The music item has been added to the Library.
 public void AddLibraryMusic(String theTitle, String thePublisher, int theCopyrightYear,
     int theLoanPeriod, String theCallNumber, double theDuration, String theArtist,
     LibraryMediaItem.MediaType theMedium, int theNumTracks)
 {
     _items.Add(new LibraryMusic(theTitle, thePublisher, theCopyrightYear,
     theLoanPeriod, theCallNumber, theDuration, theArtist,
     theMedium, theNumTracks));
 }