Homework for Tue 8th Nov 2011

A program is required which will take in a student’s Standard Grade ComputingStudies grade and decide which course, Intermediate 1, Intermediate 2 or Higheris the most appropriate. Standard Grade is issued on a scale of 1 to 7.
  1. Write the pseudocode for the part of the program which checks that the grade entered is a number between 1 and 7. (You should not need all the lines given!)
  2. Write the Visual BASIC line of code which displays a message box if an invalid grade is entered. The grade is stored in a variable called grade.
  3. Write the Visual BASIC line of code which displays a message box showing “Int 2” when the grade entered is either a 3 or a 4. The grade is stored in a variable called grade.
  4. Explain briefly what each of the following algorithms does:
  • Input validation
  • Finding a maximum
  • Finding a minimum
  • Counting occurrences
  • Linear search

4b. Write the pseudocode for the algorithms above
5. An array can be used to store variables. Explain what an array is, by using an example.

  • The values I am going to store in my example are:
  • I am going to create my array using this line of Visual BASIC code:
  • My array works like this: