Ejemplo n.º 1
0
 public void EditSinger(Singer tempSinger, int singerIndex) // Edit a singer's information, takes in a class object (Singer) & the index of the singer as parameters
 {
     // Updates all the singer's information with the information that the user inputs in
     singers[singerIndex].Name      = tempSinger.Name;
     singers[singerIndex].Gender    = tempSinger.Gender;
     singers[singerIndex].Age       = tempSinger.Age;
     singers[singerIndex].Height    = tempSinger.Height;
     singers[singerIndex].Weight    = tempSinger.Weight;
     singers[singerIndex].Hobbies   = tempSinger.Hobbies;
     singers[singerIndex].SingerPfp = tempSinger.SingerPfp;
 }
Ejemplo n.º 2
0
 public bool RemoveFavSinger(Singer theSinger) // Remove a singer from the list of favourite singers, takes in a class object (Singer) as parameter
 {
     // singer is in the list of favourite singers, remove it
     if (favSingers.Contains(theSinger))
     {
         favSingers.Remove(theSinger);
         return(true);
     }
     // singer was not in the list of favourite singers
     else
     {
         return(false);
     }
 }
Ejemplo n.º 3
0
 /*
  * public bool AddSinger(string name, string gender, int age, int height, int weight, string hobbies, Image pfp)
  * {
  *  Singer aSinger = new Singer (name, gender, age, height, weight, hobbies, pfp);
  *  singers.Add(aSinger);
  *
  *  return AddSinger(aSinger);
  * }
  */
 public bool AddSinger(Singer aSinger) // Add a singer into a band, takes in a class object (Singer) as parameter
 {
     // if singer is already in the band, don't add
     if (singers.Contains(aSinger))
     {
         return(false);
     }
     // singer is new, add to this band
     else
     {
         singers.Add(aSinger);
         return(true);
     }
 }
Ejemplo n.º 4
0
 public bool AddFavSinger(Singer aSinger)  // Add a singer into the list of favourite singers, takes in a class object (Singer) as parameter
 {
     // if singer is already in the list of favourite singers, don't add
     if (favSingers.Contains(aSinger))
     {
         return(false);
     }
     // singer is new, add to the list of favourite singers
     else
     {
         favSingers.Add(aSinger);
         return(true);
     }
 }