Reference no: EM132342486
Visual Programming Assignment -
Question 1 - Download the VB project from Moodle (i.e. Ass2-grades). Un-Compress the project and rename it as follow: Ass2-grades-Your ID.
Follow the following instructions:
1. Add a Module named GradeReport.vb to the VB project.
2. Add the following methods to GradeReport.vb module:
a. CountPassedStudents function that accepts an array of grades (i.e. double), count students who passed the course (i.e. grades >=60).
b. DisplayPass subroutine that accepts an array of grades (i.e. double) and displays the grades of all the students who passed the course by listing them in lstResult.
c. DisplayFail subroutine that accepts an array of grades (i.e. double) and displays the grades of all the students who fail in the course by listing them in lstResult.
d. ComputeAvgGrade function that accepts an array of grades (i.e. double), computes and returns the average.
e. CountAbove_BelowAvg function that accepts an array of grades (i.e. double),counts the number of grades that are above the average, counts the number of grades that are below the average, and return the counts.
f. FindMaxGradefunction that accepts an array of grades (i.e. double) and returns the maximum grades.
g. FindMinGrade function that accepts an array of grades (i.e. double) and returns the minimum grade.
3. Generate a report by:
a. Counting students who passed the course.
b. Listing grades for students who passed the course.
c. Counting students who fail in the course.
d. Listing grades for students who fail in the course.
e. Computing and displaying the average grade.
f. Counting grades above and below the average.
g. Finding and displaying the maximum grade.
h. Finding and displaying the minimum grade.
Hint: You need to declare an array to hold the input (10 grades).
Question 2 - Choose the correct answer:
1. Which library should be imported to access a txt file?
a) System.IO
b) System.InputOutput
c) System.File
d) System.txtFile
2. Which statement will overwrite data in "Graders.txt"?
a) fileWriter = new StreamWriter ("Grades.txt", True)
b) fileWriter = new StreamWriter ("Grades.txt", False)
c) fileWriter = new StreamWriter ("Grades.txt", Append)
d) fileWriter = new StreamWriter ("Grades.txt", Overwrite)
3. A text file could be accessed randomly and not sequentially?
a) True
b) False
4. readLine is a function in StreamWriter class?
c) True
d) False
Attachment:- VISUAL PROGRAMMING Assignment Files.rar