SchoolSystem (Find the bug)

Module Module1 Dim startup As Boolean = True Dim teacherid As String = My.Computer.FileSystem.ReadAllText("C:\school\t1\t1.txt") Dim student1 As String = My.Computer.FileSystem.ReadAllText("C:\school\s1\s1.txt") Dim student2 As String = My.Computer.FileSystem.ReadAllText("C:\school\s2\s2.txt") Dim student3 As String = My.Computer.FileSystem.ReadAllText("C:\school\s3\s3.txt") Sub Main() Console.Title = "School System 1.0" Console.BackgroundColor = ConsoleColor.Black Console.ForegroundColor = ConsoleColor.Yellow Console.WindowHeight = Console.LargestWindowHeight - 17 Console.WindowWidth = Console.LargestWindowWidth - 22 While startup = True Console.WriteLine("Are you a [T]eacher or a [S]tudent") If Console.ReadLine = "T" Then Console.WriteLine("Enter your TeacherID: ") If Console.ReadLine = teacherid Then Console.WriteLine("Select Student: (1)" + student1 + " (2)" + student2 + " (3)" + student3) If Console.ReadLine = "1" Then Console.WriteLine("Would you like to [V]iew " + student1 + "'s grades, or [E]dit " + student1 + "'s grades") If Console.ReadLine = "V" Then Console.WriteLine(My.Computer.FileSystem.ReadAllText("C:\school\s1\s1.txt") + ":") Console.WriteLine("Math: " + My.Computer.FileSystem.ReadAllText("C:\school\s1\m.txt")) Console.WriteLine("Science: " + My.Computer.FileSystem.ReadAllText("C:\school\s1\s.txt")) Console.WriteLine("English: " + My.Computer.FileSystem.ReadAllText("C:\school\s1\e.txt")) ElseIf Console.ReadLine = "E" Then Console.WriteLine("What class do you want to edit: [M]ath, [S]cience, or [E]nglish?") If Console.ReadLine = "M" Then Console.WriteLine("Change " + My.Computer.FileSystem.ReadAllText("C:\school\s1\m.txt") + " to:") My.Computer.FileSystem.WriteAllText("C:\school\s1\m.txt", "", False) Dim file As System.IO.StreamWriter file = My.Computer.FileSystem.OpenTextFileWriter("c:\school\s1\m.txt", True) file.Write(Console.ReadLine) file.Close() Console.WriteLine("Successfully changed grade.") ElseIf Console.ReadLine = "S" Then ElseIf Console.ReadLine = "E" Then End If Else startup = True End If ElseIf Console.ReadLine = "2" Then Console.WriteLine("Would you like to [V]iew " + student2 + "'s grades, or [E]dit " + student2 + "'s grades") If Console.ReadLine = "V" Then Console.WriteLine() ElseIf Console.ReadLine = "E" Then Console.WriteLine("What class do you want to edit: [M]ath, [S]cience, or [E]nglish?") End If ElseIf Console.ReadLine = "3" Then Console.WriteLine("Would you like to [V]iew " + student3 + "'s grades, or [E]dit " + student3 + "'s grades") If Console.ReadLine = "V" Then Console.WriteLine() ElseIf Console.ReadLine = "E" Then Console.WriteLine("What class do you want to edit: [M]ath, [S]cience, or [E]nglish?") End If End If End If ElseIf Console.ReadLine = "S" Then Console.WriteLine("What is your StudentID?") If Console.ReadLine = student1 Then Console.WriteLine("Would you like to [V]iew your grades or [L]ogout?") If Console.ReadLine = "V" Then ElseIf Console.ReadLine = "L" Then End If ElseIf Console.ReadLine = student2 Then If Console.ReadLine = "V" Then ElseIf Console.ReadLine = "L" Then End If ElseIf Console.ReadLine = student3 Then If Console.ReadLine = "V" Then ElseIf Console.ReadLine = "L" Then End If End If End If End While End Sub End Module
visit
mattnappo.com/temp.html
Thank you

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.