CSCI 112
Fall 2021 - Assignment 9
Submit deadline: 11:30am, 29 November 2021, Monday

Objective:

References:


Problem Description

This assignment is related to the Assignment 7.

The Department of Computer Science checks whether each student meets the pre-requisite for each class at the beginning of the term.

In order to perform the pre-requisite check, the department keeps a lot of data in a workbook. There are following guarantees about the format of the data in this workbook:

A student is considered to pass the pre-requisite check if the student has taken all the pre-requisite courses and got a grade other than "D", "F", "AUD", "WDR", "INC" or "TRM". If a course doesn't have any pre-requisites, then all the students in this course's class list pass the pre-requisite check.

A sample input file can be viewed in A9-input.xlsx.

One of the algorithms to perform the pre-requisite check is shown below:

For each class list, i.e., for each worksheet from 3 to Worksheets.Count
    Get the course's name
    Find out where to read the pre-requisite list of the course
    For each student in the class list
        For each pre-requisite course
            check to see whether the student passed this course
        End of For each pre-req course
        If the student passed ALL pre-requisite course
            output "YES"
        Else
            output "NO"
        End If
    End of For each student
End of For each class list

Your Tasks:

  1. Download the template file to your home directory on discovery (your U drive).
  2. Write a VBA program to check whether each student in each classlist meets the pre-requisite of the corresponding course.
    If a student in a class list pass the pre-requisite of the course, write "YES" to the column titled "Pre-requisite Passed" of the student's row; otherwise, write "NO" to the that cell.
  3. Once you've done the programming, save the file to a new (Macro- enabled) Excel file named as your LastName_A9.xlsm.

This assignment doesn't require a user interface. Note that the collection of data in the sample input file is only an example to show the format of the data.

Before submitting your assignment, you need to check at least the following things:

Submitting:

To submit your assignment, name your solution file your Lastname_A9.xlsm, then login to your VIU Learn account, find the CSCI 112 course page, click on the "Assessment" drop-down menu, click on the "Assignments" item, then click on the folder named "A9". Then you can click on the "Add a File" button to browse and upload your solution file Lastname_A9.xlsm.

If you have difficulties to make the VIU Learn submission work, please email me to let me know and attach your Excel solution file with your email.