/// <summary> /// Metodas patikrina ar filme vaidino T. Cruise ir N.Kidman. /// </summary> /// <param name="film"></param> /// <returns></returns> bool CruisAndKidmanIsOrNo(Irasas film) { string actorOne = "T. Cruise"; if (film.First_actor == actorOne || film.Second_actor == actorOne) { return(true); } return(false); }
bool FilmCheck(FilmContainer filmContainer, Irasas filmToBeChecked) { for (int i = 0; i < filmContainer.Count; i++) { if (filmContainer.GetFilm(i).Equals(filmToBeChecked)) { return(false); } } return(true); }
/// <summary> /// Pagal reikalavimus surikiuojamas rekomenduomu filmu/serialu sarasas /// </summary> public void SortRecomendations() { for (int i = 0; i < Count - 1; i++) { Irasas minValue = Films[i]; int minValueIndex = i; for (int j = i + 1; j < Count; j++) { if (Films[j] <= minValue) { minValue = Films[j]; minValueIndex = j; } } Films[minValueIndex] = Films[i]; Films[i] = minValue; } }
public void AddFilm(Irasas film, int index) { Films[index] = film; }
public void AddFilm(Irasas film) { Films[Count++] = film; }