Skip to content

Instantly share code, notes, and snippets.

@pedrogk
Created September 26, 2015 01:03
Show Gist options
  • Save pedrogk/d113fce8a662019b4d96 to your computer and use it in GitHub Desktop.
Save pedrogk/d113fce8a662019b4d96 to your computer and use it in GitHub Desktop.
Airline
class Airline {
static var corporateInformation = CorporateInformation(
name: "Bad Airlines",
address: "Bad Street 666",
webSiteURL: "www.bad.com",
)
var employees: Set<Employee>
var numberOfEmployees: Int {
get {
return employees.count
}
}
init() {
employees = []
}
func addEmployee(employee: Employee) {
employees.insert(employee)
}
static func displayCorporateInformation() {
println("\(self.corporateInformation.name) at
\(self.corporateInformation.address),
URL: \(self.corporateInformation.webSiteURL)")
}
}
Airline.displayCorporateInformation()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment