import Foundation enum InsufficientEnergy:Error { case crazyThursdayVMe50 } class Entity { let ID, name: String init?(id ID: String, name: String) { self.ID = ID self.name = name let reFormula = try! NSRegularExpression(pattern: "^\\d{13}$", options: [NSRegularExpression.Options.anchorsMatchLines]) let matchRange = NSRange(ID.startIndex.. Void { if Int.random(in: 1...7) == 7 { throw InsufficientEnergy.crazyThursdayVMe50 } } } class Student: People { override init?(id ID: String, name: String){ super.init(id: ID, name: name) let reFormula = try! NSRegularExpression(pattern: "^20\\d{2}[1-3]\\d{8}$", options: [NSRegularExpression.Options.anchorsMatchLines]) let matchRange = NSRange(ID.startIndex..