Created
September 26, 2015 01:03
-
-
Save pedrogk/d113fce8a662019b4d96 to your computer and use it in GitHub Desktop.
Airline
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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