please provide pseudocode
Posted: Fri May 20, 2022 12:01 pm
please provide pseudocode
5 The following data items will be recorded each time a student successfully logs on to the school network: Data item Student ID Host ID Time and date Example data "CJL404" "Lib01" "08:30, June 01, 2021" The Student ID is six characters long. The other two data items are of variable length. A single string will be formed by concatenating the three data items. A separator character will need to be inserted between items two and three. For example: "CJL404Libol<separator>08:30, June 01, 2021" Each string represents one log entry. A programmer decides to store the concatenated strings in a 10 array LogArray that contains 2000 elements. Unused array elements will contain an empty string. (a) Suggest a suitable separator character and give a reason for your choice. Character Reason [2] (b) The choice of data structure was made during one stage of the program development life cycle. Identify this stage. . [1]
(c) A function LogEvents () will: take a Student ID as a parameter for each element in the array that matches the Student ID parameter: o add the value of the array element to the existing text file LogFile assign an empty string to the array element count the number of lines added to the file return this count. Write pseudocode for the function LogEvents().
5 The following data items will be recorded each time a student successfully logs on to the school network: Data item Student ID Host ID Time and date Example data "CJL404" "Lib01" "08:30, June 01, 2021" The Student ID is six characters long. The other two data items are of variable length. A single string will be formed by concatenating the three data items. A separator character will need to be inserted between items two and three. For example: "CJL404Libol<separator>08:30, June 01, 2021" Each string represents one log entry. A programmer decides to store the concatenated strings in a 10 array LogArray that contains 2000 elements. Unused array elements will contain an empty string. (a) Suggest a suitable separator character and give a reason for your choice. Character Reason [2] (b) The choice of data structure was made during one stage of the program development life cycle. Identify this stage. . [1]
(c) A function LogEvents () will: take a Student ID as a parameter for each element in the array that matches the Student ID parameter: o add the value of the array element to the existing text file LogFile assign an empty string to the array element count the number of lines added to the file return this count. Write pseudocode for the function LogEvents().