Advertisement
Guest User

Untitled

a guest
Jan 26th, 2018
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 24.47 KB | None | 0 0
  1. Imports System.Console
  2. Imports System.IO
  3. Module Module1
  4. Dim question1, question2, question3, question4, question5, question11, question21, question31, question41, question51 As String, ans1, ans12, ans13, ans14, ans15, ans2, ans22, ans23, ans24, ans25, ans3, ans32, ans33, ans34, ans35, Ans4, Ans42, Ans43, Ans44, Ans45, ans5, ans52, ans53, ans54, ans55 As String, ans11, ans121, ans131, ans141, ans151, ans21, ans221, ans231, ans241, ans251, ans31, ans321, ans331, ans341, ans351, Ans41, Ans421, Ans431, Ans441, Ans451, ans51, ans521, ans531, ans541, ans551 As String ' used for answers for the comp sci questions
  5.  
  6. Public ReadOnly Property CSV_Format_Results
  7. Get
  8. Return username & "|" & score & "|" & difficulty & "|" & topic
  9. End Get
  10.  
  11. End Property
  12. Structure TStudent
  13. Public name, tutorgroup, age, password, username As String
  14.  
  15. Public ReadOnly Property CSVFormat As String
  16.  
  17. Get
  18. Return name & "|" & tutorgroup & "|" & age & "|" & password & "|" & username ' makes a string containing all the varibles in Tstudent
  19. End Get
  20. End Property
  21.  
  22. End Structure
  23. Private Sub questions()
  24. Dim csvFile As String = My.Application.Info.DirectoryPath & "\Questions.csv"
  25. Dim fileContents As List(Of String) = File.ReadAllLines(csvFile).ToList
  26.  
  27. For Each item As String In fileContents
  28. Dim splitters As String() = item.Split("|")
  29.  
  30. question1 = splitters(0)
  31. ans1 = splitters(1)
  32. ans12 = splitters(2)
  33. ans13 = splitters(3)
  34. ans14 = splitters(4)
  35. ans15 = splitters(5)
  36.  
  37. question2 = splitters(6)
  38. ans2 = splitters(7)
  39. ans22 = splitters(8)
  40. ans23 = splitters(9)
  41. ans24 = splitters(10)
  42. ans25 = splitters(11)
  43.  
  44. question3 = splitters(12)
  45. ans3 = splitters(13)
  46. ans32 = splitters(14)
  47. ans33 = splitters(15)
  48. ans34 = splitters(16)
  49. ans35 = splitters(17)
  50.  
  51. question4 = splitters(18)
  52. Ans4 = splitters(19)
  53. Ans42 = splitters(20)
  54. Ans43 = splitters(21)
  55. Ans44 = splitters(22)
  56. Ans45 = splitters(23)
  57.  
  58. question5 = splitters(24)
  59. ans5 = splitters(25)
  60. ans52 = splitters(26)
  61. ans53 = splitters(27)
  62. ans54 = splitters(28)
  63. ans55 = splitters(29)
  64.  
  65. question11 = splitters(30)
  66. ans11 = splitters(31)
  67. ans121 = splitters(32)
  68. ans131 = splitters(33)
  69. ans141 = splitters(34)
  70. ans151 = splitters(35)
  71.  
  72. question21 = splitters(36)
  73. ans21 = splitters(37)
  74. ans221 = splitters(38)
  75. ans231 = splitters(39)
  76. ans241 = splitters(40)
  77. ans251 = splitters(41)
  78.  
  79. question31 = splitters(42)
  80. ans31 = splitters(43)
  81. ans321 = splitters(44)
  82. ans331 = splitters(45)
  83. ans341 = splitters(46)
  84. ans351 = splitters(47)
  85.  
  86. question41 = splitters(48)
  87. Ans41 = splitters(49)
  88. Ans421 = splitters(50)
  89. Ans431 = splitters(51)
  90. Ans441 = splitters(52)
  91. Ans451 = splitters(53)
  92.  
  93. question51 = splitters(54)
  94. ans51 = splitters(55)
  95. ans521 = splitters(56)
  96. ans531 = splitters(57)
  97. ans541 = splitters(58)
  98. ans551 = splitters(59)
  99.  
  100. Next
  101.  
  102.  
  103. End Sub
  104.  
  105. Dim lstStudents As New List(Of TStudent) ' this creates a list of students
  106. Private Sub importStudents() 'imports students to a list
  107. Dim csvFile As String = My.Application.Info.DirectoryPath & "\student.csv" ' file path for the csv file
  108. Dim fileContents As List(Of String) = File.ReadAllLines(csvFile).ToList ' looks at what is written in the file and takes each line and makes a list
  109. For Each item As String In fileContents 'does the code below for each item
  110. Dim stu As TStudent ' declares stu as a varible of Tstudent
  111. Dim splitters As String() = item.Split("|") ' declares the splitter
  112.  
  113. With stu
  114. .name = splitters(0)
  115. .tutorgroup = splitters(1) ' breaks down the string and picks out the name, tutorgroup and age
  116. .age = splitters(2)
  117. .password = splitters(3)
  118. .username = splitters(4)
  119. End With
  120. lstStudents.Add(stu) ' adds the student
  121. Next
  122.  
  123. End Sub
  124. Dim newStudent As TStudent
  125. Private Function registerstudent() As TStudent ' apart of the tstudent
  126. WriteLine("enter your name:") ' asks user for there name
  127. newStudent.name = ReadLine.Trim
  128.  
  129. WriteLine("Enter your Tutor group:") ' asks for tutor group
  130. newStudent.tutorgroup = ReadLine.Trim ' gets rid of any extra spaces after the tutor group.
  131.  
  132. WriteLine("Enter your age:") ' asks for age
  133. newStudent.age = ReadLine.Trim
  134.  
  135. WriteLine("Enter your password:")
  136. newStudent.password = ReadLine.Trim
  137. If newStudent.password = "" Or newStudent.age = "" Or newStudent.age = "" Then
  138. WriteLine("Invalid input: Press enter to restart.")
  139. ReadLine()
  140. Clear()
  141. Main()
  142. End If
  143. newStudent.username = newStudent.name.Substring(0, 3) + newStudent.age ' this generates the unique username for the user
  144. SaveUserFile() ' saves the file
  145. ReadLine()
  146. Return newStudent
  147.  
  148. End Function
  149.  
  150. Private Sub studentselection()
  151. Clear()
  152. WriteLine()
  153. importStudents()
  154. questions()
  155. WriteLine("username = first 3 letters of your name and then your age e.g. jac15")
  156. WriteLine("Username:") ' asks user to enter username
  157. username = ReadLine.Trim 'gets rid of any extra spaces after there name
  158.  
  159. WriteLine()
  160. WriteLine("password:") ' asks user to enter there password
  161. WriteLine()
  162. password = ReadLine.Trim ' gets rid of extra spaces
  163.  
  164. For Each stu In lstStudents
  165. If stu.username = username Then ' this checksif the usernames match
  166. If stu.password = password Then ' this checks if the password matches the username
  167. WriteLine("Account found ")
  168. quiz()
  169. Exit For
  170. Else
  171. WriteLine("incorrect usename or password: ")
  172. ReadLine()
  173. Clear()
  174. Main()
  175. End If
  176. End If
  177. Next
  178.  
  179. WriteLine("invalid input")
  180. ReadLine()
  181. Clear()
  182. Main()
  183. End Sub
  184. Sub History()
  185. Dim csvFile As String = My.Application.Info.DirectoryPath & "\Results.csv", userans As String = "0", diffuculty_selected As String = "0" ' csvfile shows path of the results userans is used for selection of ans
  186.  
  187. WriteLine()
  188. WriteLine("Please select the difficulty ")
  189. WriteLine()
  190. WriteLine("******************************")
  191. WriteLine()
  192. WriteLine("1. Easy (2 possible answers)") ' this displays the possible difficulties and asks the user to select one by typing 1-3
  193. WriteLine("2. medium (3 possible answers")
  194. WriteLine("3. hard (5 possible answers)")
  195. WriteLine()
  196. WriteLine("******************************")
  197.  
  198. diffuculty_selected = ReadLine()
  199. If diffuculty_selected = "1" Then
  200. difficulty = "easy"
  201. ElseIf diffuculty_selected = "2" Then '
  202. difficulty = "medium"
  203. ElseIf diffuculty_selected = "3" Then
  204. difficulty = "hard"
  205. Else
  206. WriteLine("please select a valid difficulty") ' this part makes sure that the input is valid and within range of the selection (1-3)
  207. ReadLine() ' if it is not then they will see this and then will be sent back to the quiz sub where they can pick it again
  208. quiz()
  209. End If
  210.  
  211. WriteLine()
  212. WriteLine("Questions 1")
  213. WriteLine()
  214. WriteLine(question11) ' this displays question 1
  215. WriteLine()
  216. WriteLine("Please select an answer ")
  217. If difficulty = "easy" Then
  218. WriteLine()
  219. WriteLine("1:" & ans11) ' this displays 2 answers
  220. WriteLine("2:" & ans141)
  221. userans = ReadLine()
  222.  
  223. ElseIf difficulty = "medium" Then
  224. WriteLine()
  225. WriteLine("1:" & ans11)
  226. WriteLine("2:" & ans121) ' this displays 3 answers
  227. WriteLine("3:" & ans151)
  228. userans = ReadLine()
  229. Else
  230. WriteLine()
  231. WriteLine("1:" & ans11)
  232. WriteLine("2:" & ans121)
  233. WriteLine("3:" & ans151) ' this displays 5 answers
  234. WriteLine("4:" & ans131)
  235. WriteLine("5:" & ans141)
  236. userans = ReadLine()
  237. End If
  238. If userans = "1" Then score = score + 1 'this checks if the user has got the question correct if they have they gain +1 to there score
  239.  
  240. WriteLine()
  241. WriteLine("Questions 2")
  242. WriteLine()
  243. WriteLine(question21) ' displays question 2
  244. WriteLine()
  245. WriteLine("Please select an answer ")
  246. If difficulty = "easy" Then
  247. WriteLine()
  248. WriteLine("1: " & ans21) ' this displays 2 answers
  249. WriteLine("2: " & ans221)
  250. userans = ReadLine()
  251. ElseIf difficulty = "medium" Then
  252. WriteLine()
  253. WriteLine("1: " & ans231)
  254. WriteLine("2: " & ans221) ' this displays 3 answers
  255. WriteLine("3: " & ans251)
  256. userans = ReadLine()
  257. Else
  258. WriteLine()
  259. WriteLine("1: " & ans241)
  260. WriteLine("2: " & ans221)
  261. WriteLine("3: " & ans21) ' this displays 5 answers
  262. WriteLine("4: " & ans231)
  263. WriteLine("5: " & ans251)
  264. userans = ReadLine()
  265. End If
  266. If userans = "2" Then score = score + 1
  267.  
  268. WriteLine()
  269. WriteLine("Questions 3")
  270. WriteLine()
  271. WriteLine(question31) ' this displays question 3
  272. WriteLine()
  273. WriteLine("Please select an answer ")
  274. If difficulty = "easy" Then
  275. WriteLine()
  276. WriteLine("1: " & ans31) ' this displays 2 answers
  277. WriteLine("2: " & ans351)
  278. userans = ReadLine()
  279. ElseIf difficulty = "medium" Then
  280. WriteLine()
  281. WriteLine("1: " & ans31)
  282. WriteLine("2: " & ans341) ' this displays 3 answers
  283. WriteLine("3: " & ans351)
  284. userans = ReadLine()
  285. Else
  286. WriteLine()
  287. WriteLine("1: " & ans31)
  288. WriteLine("2: " & ans331)
  289. WriteLine("3: " & ans321) ' this displays 5 answers
  290. WriteLine("4: " & ans341)
  291. WriteLine("5: " & ans351)
  292. userans = ReadLine()
  293. End If
  294. If userans = "1" Then score = score + 1
  295.  
  296. WriteLine()
  297. WriteLine("Questions 4")
  298. WriteLine()
  299. WriteLine(question41) ' this displays question 4
  300. WriteLine()
  301. WriteLine("Please select an answer ")
  302. If difficulty = "easy" Then
  303. WriteLine()
  304. WriteLine("1: " & Ans41) ' this displays 2 answers
  305. WriteLine("2: " & Ans431)
  306. userans = ReadLine()
  307. ElseIf difficulty = "medium" Then
  308. WriteLine()
  309. WriteLine("1: " & Ans41)
  310. WriteLine("2: " & Ans431) ' this displays 3 answers
  311. WriteLine("3: " & Ans451)
  312. userans = ReadLine()
  313. Else
  314. WriteLine()
  315. WriteLine("1: " & Ans41)
  316. WriteLine("2: " & Ans431)
  317. WriteLine("3: " & Ans421) ' this displays 5 answers
  318. WriteLine("4: " & Ans441)
  319. WriteLine("5: " & Ans451)
  320. userans = ReadLine()
  321. End If
  322. If userans = "1" Then score = score + 1
  323.  
  324. WriteLine()
  325. WriteLine("Questions 5")
  326. WriteLine()
  327. WriteLine(question51) ' this displays question 5
  328. WriteLine()
  329. WriteLine("Please select an answer ")
  330. If difficulty = "easy" Then
  331. WriteLine()
  332. WriteLine("1: " & ans51) ' this displays 2 answers
  333. WriteLine("2: " & ans531)
  334. userans = ReadLine()
  335. ElseIf difficulty = "medium" Then
  336. WriteLine()
  337. WriteLine("1: " & ans51)
  338. WriteLine("2: " & ans531) ' this displays 3 answers
  339. WriteLine("3: " & ans551)
  340. userans = ReadLine()
  341. Else
  342. WriteLine()
  343. WriteLine("1: " & ans51)
  344. WriteLine("2: " & ans531)
  345. WriteLine("3: " & ans521) ' this displays 5 answers
  346. WriteLine("4: " & ans541)
  347. WriteLine("5: " & ans551)
  348. userans = ReadLine()
  349. End If
  350. If userans = "2" Then score = score + 1
  351.  
  352.  
  353. percentage = score * 20 ' this calculates the percentage.
  354. If percentage = 0 Then ' this if statment calculates the grade that the user has achived
  355. grade = "fail"
  356.  
  357. ElseIf percentage = 20 Or percentage = 40 Then
  358. grade = "level 1"
  359. ElseIf percentage = 60 Or percentage = 80 Then
  360. grade = "level 2"
  361. ElseIf percentage = 100 Then
  362. grade = ("level 3")
  363.  
  364.  
  365. Else grade = ("There was a problem calculating your grade please try the quiz again") ' if the program cant do what is above then they are displayed an error message
  366.  
  367. End If
  368.  
  369. WriteLine()
  370. WriteLine("you got a score of: " & score) ' tells user there score
  371. WriteLine("you got " & percentage & " % of questions right") ' tells user the percentage of question right
  372. WriteLine("You gotten the grade: " & grade) ' tells user there grade they achived
  373. ReadLine()
  374.  
  375. If Not File.Exists(csvFile) Then ' checks if file exists if it doesnt it will create it
  376. Using sw As StreamWriter = File.CreateText(csvFile)
  377. sw.WriteLine(CSV_Format_Results) ' this rights CSV_Format_Results to the file called results
  378. End Using
  379. Else
  380. Using sw As StreamWriter = File.AppendText(csvFile)
  381. sw.WriteLine(CSV_Format_Results) ' this rights CSV_Format_Results to the file called results
  382. End Using
  383. End If
  384. End
  385. End Sub
  386. Sub quiz()
  387.  
  388. Dim csvFile As String = My.Application.Info.DirectoryPath & "\Results.csv", userans As String = "0", Selected_Topic As String = "0" ' csvfile shows path of the results userans is used for selection of ans
  389.  
  390. Clear()
  391. WriteLine()
  392. WriteLine("please pick a topic")
  393. WriteLine()
  394. WriteLine("*******************") ' this lets the user select a topic
  395. WriteLine("1. Computer science")
  396. WriteLine("2. Maths")
  397. WriteLine("*******************")
  398. Selected_Topic = ReadLine()
  399.  
  400. If Selected_Topic = "1" Then
  401. topic = "computer science"
  402. ElseIf Selected_Topic = "2" Then
  403. topic = "Maths"
  404. Else
  405. WriteLine("The topic you have selected is not valid please try again") ' this makes sure that the user only enters a valid number and that it is within range
  406. ReadLine()
  407. quiz()
  408. End If
  409.  
  410. If topic = "Maths" Then ' if the topic picked is maths then they are sent to the maths sub
  411. History()
  412. End If
  413.  
  414. Dim diffuculty_selected As String = "0" ' ********** The below hasnt been commented as it is the same as the code in the sub called "History"
  415. WriteLine()
  416. WriteLine("Please select the difficulty ")
  417. WriteLine()
  418. WriteLine("******************************")
  419. WriteLine()
  420. WriteLine("1. Easy (2 possible answers)")
  421. WriteLine("2. medium (3 possible answers")
  422. WriteLine("3. hard (5 possible answers)")
  423. WriteLine()
  424. WriteLine("******************************")
  425.  
  426. diffuculty_selected = ReadLine()
  427. If diffuculty_selected = "1" Then
  428. difficulty = "easy"
  429. ElseIf diffuculty_selected = "2" Then
  430. difficulty = "medium"
  431. ElseIf diffuculty_selected = "3" Then
  432. difficulty = "hard"
  433. Else
  434. WriteLine("please select a valid difficulty")
  435. ReadLine()
  436. quiz()
  437. End If
  438.  
  439. If topic = "computer science" Then
  440. WriteLine()
  441. WriteLine("Questions 1")
  442. WriteLine()
  443. WriteLine(question1)
  444. WriteLine()
  445. WriteLine("Please select an answer ")
  446. If difficulty = "easy" Then
  447. WriteLine()
  448. WriteLine("1:" & ans1)
  449. WriteLine("2:" & ans14)
  450. userans = ReadLine()
  451. ElseIf difficulty = "medium" Then
  452. WriteLine()
  453. WriteLine("1:" & ans1)
  454. WriteLine("2:" & ans12)
  455. WriteLine("3:" & ans15)
  456. userans = ReadLine()
  457. Else
  458. WriteLine()
  459. WriteLine("1:" & ans1)
  460. WriteLine("2:" & ans12)
  461. WriteLine("3:" & ans15)
  462. WriteLine("4:" & ans13)
  463. WriteLine("5:" & ans14)
  464. userans = ReadLine()
  465. End If
  466. If userans = "1" Then score = score + 1
  467.  
  468. WriteLine()
  469. WriteLine("Questions 2")
  470. WriteLine()
  471. WriteLine(question2)
  472. WriteLine()
  473. WriteLine("Please select an answer ")
  474. If difficulty = "easy" Then
  475. WriteLine()
  476. WriteLine("1: " & ans2)
  477. WriteLine("2: " & ans22)
  478. userans = ReadLine()
  479. ElseIf difficulty = "medium" Then
  480. WriteLine()
  481. WriteLine("1: " & ans23)
  482. WriteLine("2: " & ans22)
  483. WriteLine("3: " & ans25)
  484. userans = ReadLine()
  485. Else
  486. WriteLine()
  487. WriteLine("1: " & ans24)
  488. WriteLine("2: " & ans22)
  489. WriteLine("3: " & ans2)
  490. WriteLine("4: " & ans23)
  491. WriteLine("5: " & ans25)
  492. userans = ReadLine()
  493. End If
  494. If userans = "2" Then score = score + 1
  495.  
  496. WriteLine()
  497. WriteLine("Questions 3")
  498. WriteLine()
  499. WriteLine(question3)
  500. WriteLine()
  501. WriteLine("Please select an answer ")
  502. If difficulty = "easy" Then
  503. WriteLine()
  504. WriteLine("1: " & ans3)
  505. WriteLine("2: " & ans35)
  506. userans = ReadLine()
  507. ElseIf difficulty = "medium" Then
  508. WriteLine()
  509. WriteLine("1: " & ans3)
  510. WriteLine("2: " & ans34)
  511. WriteLine("3: " & ans35)
  512. userans = ReadLine()
  513. Else
  514. WriteLine()
  515. WriteLine("1: " & ans3)
  516. WriteLine("2: " & ans33)
  517. WriteLine("3: " & ans32)
  518. WriteLine("4: " & ans34)
  519. WriteLine("5: " & ans35)
  520. userans = ReadLine()
  521. End If
  522. If userans = "1" Then score = score + 1
  523.  
  524. WriteLine()
  525. WriteLine("Questions 4")
  526. WriteLine()
  527. WriteLine(question4)
  528. WriteLine()
  529. WriteLine("Please select an answer ")
  530. If difficulty = "easy" Then
  531. WriteLine()
  532. WriteLine("1: " & Ans4)
  533. WriteLine("2: " & Ans43)
  534. userans = ReadLine()
  535. ElseIf difficulty = "medium" Then
  536. WriteLine()
  537. WriteLine("1: " & Ans4)
  538. WriteLine("2: " & Ans43)
  539. WriteLine("3: " & Ans45)
  540. userans = ReadLine()
  541. Else
  542. WriteLine()
  543. WriteLine("1: " & Ans4)
  544. WriteLine("2: " & Ans43)
  545. WriteLine("3: " & Ans42)
  546. WriteLine("4: " & Ans44)
  547. WriteLine("5: " & Ans45)
  548. userans = ReadLine()
  549. End If
  550. If userans = "2" Then score = score + 1
  551.  
  552. WriteLine()
  553. WriteLine("Questions 5")
  554. WriteLine()
  555. WriteLine(question5)
  556. WriteLine()
  557. WriteLine("Please select an answer ")
  558. If difficulty = "easy" Then
  559. WriteLine()
  560. WriteLine("1: " & ans5)
  561. WriteLine("2: " & ans53)
  562. userans = ReadLine()
  563. ElseIf difficulty = "medium" Then
  564. WriteLine()
  565. WriteLine("1: " & ans5)
  566. WriteLine("2: " & ans53)
  567. WriteLine("3: " & ans55)
  568. userans = ReadLine()
  569. Else
  570. WriteLine()
  571. WriteLine("1: " & ans5)
  572. WriteLine("2: " & ans53)
  573. WriteLine("3: " & ans52)
  574. WriteLine("4: " & ans54)
  575. WriteLine("5: " & ans55)
  576. userans = ReadLine()
  577. End If
  578. End If
  579. If userans = "1" Then score = score + 1
  580.  
  581. percentage = score * 20
  582. If percentage = 0 Then
  583. grade = "fail"
  584. ElseIf percentage = 20 Or percentage = 40 Then
  585. grade = "level 1"
  586. ElseIf percentage = 60 Or percentage = 80 Then
  587. grade = "level 2"
  588. ElseIf percentage = 100 Then
  589. grade = ("level 3")
  590.  
  591. Else
  592. grade = ("There was a problem calculating your grade please try the quiz again")
  593. End If
  594.  
  595.  
  596. WriteLine()
  597. WriteLine("you got a score of: " & score)
  598. WriteLine("you got " & percentage & " % of questions right")
  599. WriteLine("You gotten the grade: " & grade)
  600. ReadLine()
  601.  
  602. If Not File.Exists(csvFile) Then ' checks if file exists if it doesnt it will create it
  603. Using sw As StreamWriter = File.CreateText(csvFile)
  604. sw.WriteLine(CSV_Format_Results)
  605. End Using
  606. Else
  607. Using sw As StreamWriter = File.AppendText(csvFile)
  608. sw.WriteLine(CSV_Format_Results)
  609. End Using
  610. End If
  611. End Sub
  612. Private Sub SaveUserFile()
  613. Dim csvFile As String = My.Application.Info.DirectoryPath & "\student.csv" ' declares file path of student.csv
  614. If Not File.Exists(csvFile) Then ' checks if file exists if it doesnt it will create it
  615. Using sw As StreamWriter = File.CreateText(csvFile)
  616. sw.WriteLine(newStudent.CSVFormat)
  617. End Using
  618. Else
  619. Using sw As StreamWriter = File.AppendText(csvFile)
  620. sw.WriteLine(newStudent.CSVFormat)
  621. End Using
  622. End If
  623. WriteLine("student added ") ' tells the user they have been added
  624. Main()
  625. End Sub
  626. Dim topic As String, grade As String, difficulty As String, username As String, password As String, answer As Boolean, score As Integer, percentage As Integer = score * 20
  627. Sub Main()
  628.  
  629. Dim registerd As String ' this is used to ask the user if they are registered
  630.  
  631.  
  632. WriteLine("***************************")
  633. WriteLine()
  634. WriteLine("Have you registered? (Y/N) ") ' asks user if they registered
  635. WriteLine()
  636. WriteLine("***************************")
  637. WriteLine()
  638. registerd = ReadLine()
  639.  
  640. If registerd = "Y" Or registerd = "y" Or registerd = "yes" Or registerd = "Yes" Or registerd = "YES" Then
  641. studentselection() ' if they have registered they are sent to the login sub
  642.  
  643. ElseIf registerd = "N" Or registerd = "n" Or registerd = "No" Or registerd = "NO" Or registerd = "no" Then
  644. registerstudent() ' if they are not registered then they are sent to the register sub
  645. Else
  646. WriteLine("Invalid selection, Please restart the program by pressing enter: ")
  647. ReadLine()
  648. Clear()
  649. Main()
  650.  
  651. End If
  652.  
  653. End Sub
  654.  
  655. End Module
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement