We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f63bcee commit fa77ffdCopy full SHA for fa77ffd
assignment_4/csharp/factorymethod.cs
@@ -13,7 +13,7 @@ class Cat : Animal {
13
}
14
15
class AnimalFactory {
16
- public static Animal CreateAnimal(string type) {
+ public static Animal? CreateAnimal(string type) {
17
return type switch {
18
"dog" => new Dog(),
19
"cat" => new Cat(),
0 commit comments