/// <summary> /// Supports output to dispaly all movies that the member is currently borrowing /// </summary> /// <param name="borrowing">all movies that the member is currently borrowing</param> /// <returns>text of all movie information</returns> public static string Member4(Movie[] borrowing) { Console.WriteLine("\n=====Your borrowings====="); string text = ""; foreach (Movie m in borrowing) { if (m != null) { text += string.Format( "Title: {0} \n" + " -Starring: {1} \n" + " -Director: {2} \n" + " -Duration: {3} \n" + " -Genre: {4} \n" + " -Classification: {5} \n" + " -Release date: {6} \n", m.title, m.starring, m.director, m.duration, GenreMethods.toString(m.genre), ClassificationMethods.toString(m.classification), m.releaseDate); text += "\n"; } } return(text); }
/// <summary> /// Supports output of member option 1 (display all movies) /// </summary> /// <param name="movies">movie collection</param> /// <returns>text contains all movie information</returns> public static string Member1(Movie[] movies) { Console.WriteLine("\n=====All movies====="); string text = ""; foreach (Movie m in movies) { text += String.Format( "Title: {0} \n" + " -Starring: {1} \n" + " -Director: {2} \n" + " -Duration: {3} \n" + " -Genre: {4} \n" + " -Classification: {5} \n" + " -Release date: {6} \n" + " -Availability {7} \n" + " -Number of rented {8} \n", m.title, m.starring, m.director, m.duration, GenreMethods.toString(m.genre), ClassificationMethods.toString(m.classification), m.releaseDate, m.NumCopies, m.NumBorrowed); text += "\n"; } return(text); }