Note that there are some explanatory texts on larger screens.

plurals
  1. POin class project totally stuck, visual basic intro course half way done
    text
    copied!<p>The teacher is very tough and unhelpful in this class. I have tried my best to keep up but fell behind and need a good score on this in class assignment can anyone help me? I ahae asked tons of questions stayed after and used the tutor but apperently im a terrible programmer. just need to pass this class because im in networking but its required. Working on flow chart and psuedo as we speak if anyone could even just get me started its such a simple program im just messed up on my fundamentals.</p> <p>Build a console program that requests the user’s birthday and outputs the top selling album from the year they were born. The list of the top selling albums is listed below. </p> <p>Input file: final.txt</p> <pre> 1956 Calypso 1957 My Fair Lady 1958 My Fair Lady 1959 Music from Peter Gunn 1960 The Sound of Music 1961 Camelot 1962 West Side Story 1963 West Side Story 1964 Hello, Dolly! 1965 Mary Poppins 1966 Whipped Cream & Other Delights 1967 More of The Monkees 1968 Are You Experienced? 1969 In-A-Gadda-Da-Vida 1970 Bridge Over Troubled Water 1971 Jesus Christ Superstar 1972 Harvest 1973 The World Is a Ghetto 1974 Goodbye Yellow Brick Road 1975 Elton John's Greatest Hits 1976 Frampton Comes Alive 1977 Rumours 1978 Saturday Night Fever 1979 52nd Street 1980 The Wall 1981 Hi Infidelity 1982 Asia 1983 Thriller 1984 Thriller 1985 Born in the U.S.A. 1986 Whitney Houston 1987 Slippery When Wet 1988 Faith 1989 Don't Be Cruel 1990 Janet Jackson's Rhythm Nation 1991 Ropin' The Wind 1992 Some Gave All 1993 The Bodyguard 1994 The Lion King 1995 Cracked Rear View 1996 Jagged Little Pill 1997 Spice 1998 Titanic 1999 Millennium</pre> <p>The following prompt should be used. </p> <p>Please enter your birthdate (MM-DD-YY) “End” to finish:</p> <p>When the program is finished an output file needs to be written. The file should contain: the number of searches performed and a list of the years searched.</p> <p>Compress the project file, flowchart, psuedo code and output and Upload it</p> <p>This is how far I have made it. </p> <pre><code>Sub Main() Try Dim albums As List(Of String) = New List(Of String)() Dim response As String = String.Empty Dim searches As List(Of String) = New List(Of String)() Dim year As Integer = 0 Using reader As New System.IO.StreamReader("E:\IntroProgramming\FinalProject\Final.txt") While Not reader.EndOfStream albums.Add(reader.ReadLine()) End While End Using While response.ToUpper() &lt;&gt; "END" Console.Write("Please enter your birthdate (MM-DD-YY) ""End"" to finish: ") response = Console.ReadLine() If (Integer.TryParse(response.Substring(response.Length - 2), year)) Then If (year &gt;= 56 And year &lt;= 99) Then searches.Add("19" &amp; response.Substring(response.Length - 2)) Console.WriteLine("The best selling album for the year 19" &amp; year.ToString() &amp; " was " &amp; albums(year - 56)) Else Console.WriteLine("Invalid year! Please try again") End If End If End While Using writer As New System.IO.StreamWriter("finaloutput.txt", False) writer.WriteLine("There were a total of " &amp; searches.Count.ToString() &amp; " valid searches") For Each s As String In searches writer.WriteLine(s) Console.ReadLine() Next End Using Catch ex As Exception Console.WriteLine(ex.ToString()) Console.ReadLine() End Try End Sub </code></pre> <p>End Module</p> <p>Everything is working except the when you enter End to finish it is not outputing number of searches and list of years searched.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload