๐ WAYPOINT LESSON
Checkpoint โ Methods
โญ beginnerโณ 20 min read๐ Lesson 21 of 85
Dispatch, contracts, and counting โ two methods, both tested on their edges.
Checkpoint: the operator console
Task: implement two methods:
static double Apply(char op, double a, double b)โ+,-,*behave as usual;/divides but throwsDivideByZeroExceptionwhenbis exactly 0 (remember: doubles don't throw on their own โ1.0 / 0.0isInfinity, so you must check); any other character throwsArgumentException.static int CountVowels(string s)โ count of vowelsaeiou, case-insensitive; null or empty input counts 0.