Given two variables, isEmpty of type boolean, indicating whether a class roster is empty or not, and numberOfCredits of type integer, containing the number of credits for a class, write an expression that evaluates to true if the class roster is not empty and the class is one or three credits.

LANGUAGE: Visual Basic

CHALLENGE:

Given two variables, isEmpty of type boolean, indicating whether a class roster is empty or not, and numberOfCredits of type integer, containing the number of credits for a class, write an expression that evaluates to true if the class roster is not empty and the class is one or three credits.

SOLUTION:

Not isEmpty And ((numberOfCredits= 1) Or (numberOfCredits = 3))