CJCoding With Joseph
15free / daySign inCreate account

Boolean-Returning Interface Method

The IValidator interface declares bool IsValid(string input). Complete the NotEmptyValidator class so IsValid returns true when the input has at least one character and false when it is empty. Do NOT write a Main method.

For "hi" the program prints the output shown in Expected Output.

For "" it prints:
False

Expected Output:

True

= newline. The output ends with a newline — print one after the last line.

Hints2 available
Topics:
Interfaces
1
Tab to indent (Esc then Tab to move on) · Ctrl+Enter to run · Shift+Alt+F to format · Ctrl+Space to expand shortcuts (cw, cr, fori)

Your Output

Run your code to see the output here...

Test Cases

Run your code to see test case results.