     }
 }
 
-let s : Animal = Horse(name: "CJ")
-s.speak()
+let h: Animal = Horse(name: "CJ")
+assert(h.speak() == "CJ says neigh")
 let c: Animal = Cow(name: "Bessie")
-c.speak()
-Sheep(name:"Little Lamb").speak()
+assert(c.speak() == "Bessie says moooo")
+assert(Sheep(name:"Little Lamb").speak() == "Little Lamb says baaaa")

class Animal {
    private let name : String?
    
    init (name: String) {
        self.name = name
    }
    
    func sound () -> String {
        preconditionFailure("This method must be overridden")
    }
    
    func speak () {
        print("\(self.name!) says \(self.sound())")
    }
}

class Cow : Animal {
    override init (name : String) {
        super.init(name: name)
    }
    

    }
}

class Horse: Animal {
    override init(name: String) {
        super.init(name: name)
    }
    
