Reading Delimited Files Algorithms:
School Litter Collection:
Open data file using TextFieldParser and declare a variable that will read it.
Set the type of the text field.
Set the value for the delimiter.
Declare variables to store the table data.
Declare the formatted string.
Set the font for the list box table.
Create a loop that will read the file.
Store the data values from the file into the different table variables.
Add the data to the list box table.
Check Your DP:
Create Boolean Function stuAvail() that:
Uses a Text field parser to read the [Link] file.
Declares variables for the student number and the Boolean to check if the student number
appears in the file.
Sets the type of file being read.
Sets delimiter.
Uses while loop to read all fields and lines of the file and uses and If statement to check if
the student number is in the file.
Create Integer Function calcDP() that takes your student number as an argument:
Reads the file [Link] like the previous function.
Declares variables for the student number and different assessment marks recorded in the
txt file.
Declares a variable that will store the DP.
Uses a while loop to read through the text file.
Sets the different variables to the different data values from the text file.
Uses an If statement to search for the student number and when it finds it, it uses the
other values to calculate the DP.
Returns DP
Uses the two functions to calculate your DP from inputting your student number.
Reading Mark down Files Algorithms:
Question Paper Marker:
Create a Stream reader variable to read the text file.
Declare variables for the answer and an array for the answers from the [Link]
Declare i variable for handling the index of the memo array.
Declare marks variable to calculate the total mark that the student receives.
Close the file.
Uses a Combo boxes and a text box to ask the student questions and take their answers.
Uses If Statements to check if the answers from the different combo boxes and text box are
the same as the answers from the memo array, if they are, 1 is added to marks variable.
Displays that total mark on a Label.
Writing Mark down Files Algorithms:
Bank Statement Generator:
Declare variable ID to collect the identity number from a text box.
Use A Stream reader to read [Link].
Declare a variable for the StreamWriter, that sets the second argument to True to create a
new file.
Declare variables for all the information stored in the [Link] file.
Set the text field type and the delimiter.
Use a while loop to read through the file and set each variable name to a different data value
from the text file.
Us If statement to search for the ID number in the text file.
If the ID number is found use the stream writer variable to write the details that are on the
same field as the ID number in different lines in the generated text file.
Close the stream writer.
Writing Delimited Files Algorithms:
Sign Up details storer:
Declare a variable for the stream writer.
Declare variables for name, surname, email, phone number, password and re-entering the
password.
Use the variables to store values from different text boxes you use to collect information.
Use an If statement to check if the two passwords match.
If the do write the values of the variables in the generated file.
If they do not match, clear the text boxes used to collect the two passwords so you can re
enter them.