Demo entry 2701170

Airline

   

Submitted by anonymous on Sep 18, 2015 at 03:51
Language: Swift. Code size: 733 Bytes.

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()

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).