Const MSG_ID_INCORRECT = "ID has incorrect format. ID must be unique and must be between 10,000 and 99,999 inclusive"
Private IDs(NUM_STUDENTS - 1) as integer
Private ENGs(NUM_STUDENTS - 1) as integer
Private SCIs(NUM_STUDENTS - 1) as integer
Private MATs(NUM_STUDENTS - 1) as integer
Console.WriteLine(" Mark Analysis System. What Do you want to do.Enter 1 to enter marks, 2 to display, 3 to search ")
nOption = Console.ReadLine()
For i = 0 to NUM_STUDENTS - 1
Console.writeline(" Enter ID and Results.Format is: ID, EnglishResult, MathResult, ScienceResult ")
Dim asIn = sIn.Split(", ")
isvalid = validate_ID(nTemp)
Console.WriteLine("Please re-enter ID")
nTemp = Console.readline()
isvalid = validate_ID(nTemp)
Function Validate_ID(nID as integer) as boolean
if nID < 9999 OR nID > 99999 then
Console.WriteLine("ID value incorrect. ID needs to be between 10,000 and 99,999. ")
if array.IndexOf(IDs, nID) = -1 then
Console.WriteLine("ID not unique")
Public Sub PrintArray(the_array as object)
For each s as object in the_array
Console.write("{0} ", s.ToString())