public RunChapter01(string excercise) { Chapter01 chapter = new Chapter01(); switch (excercise) { case "1L": Console.WriteLine(chapter.PatternToNumber("TTT")); Console.ReadLine(); break; case "1M": Console.WriteLine(chapter.NumberToPattern(63, 2)); Console.ReadLine(); break; case "1N": Console.WriteLine(string.Join("\n", chapter.Neighbors("ACGT", 2))); Console.ReadLine(); break; default: Console.Write("Cannot interpret exercise number"); Console.ReadLine(); break; } }
public RunChapter03(string excercise) { Chapter01 chapter = new Chapter01(); switch (excercise) { case "test_graph": Console.WriteLine("Add First:"); LinkedList myList1 = new LinkedList(); myList1.AddFirst("Hello"); myList1.AddFirst("Magical"); myList1.AddFirst("World"); myList1.PrintAllNodes(); Console.WriteLine(); Console.WriteLine("Add Last:"); LinkedList myList2 = new LinkedList(); myList2.AddLast("Hello"); myList2.AddLast("Magical"); myList2.AddLast("World"); myList2.PrintAllNodes(); Console.ReadLine(); break; case "3A": break; default: Console.Write("Cannot interpret exercise number"); Console.ReadLine(); break; } }