public void addMusic(Music music) { Contract.Requires(music != null); Contract.Ensures(this.MusicList.Count == Contract.OldValue(this.MusicList.Count) + 1); this.MusicList.Add(music); }
public void removeMusic(Music music) { Contract.Requires(music != null); Contract.Ensures(this.MusicList.Count == Contract.OldValue(this.MusicList.Count) - 1); this.MusicList.Remove(music); }