-
Notifications
You must be signed in to change notification settings - Fork 0
/
Person.swift
32 lines (27 loc) · 1002 Bytes
/
Person.swift
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
//
// Person.swift
// Duet
//
// Created by Ed Ngai on 11/19/15.
// Copyright © 2015 Ed Ngai. All rights reserved.
//
import UIKit
class Person: NSObject {
let Name: NSString
let Image: UIImage!
let Age: NSNumber
let NumberOfSharedFriends: NSNumber?
let NumberOfSharedInterests: NSNumber
let NumberOfPhotos: NSNumber
override var description: String {
return "Name: \(Name), \n Image: \(Image), \n Age: \(Age) \n NumberOfSharedFriends: \(NumberOfSharedFriends) \n NumberOfSharedInterests: \(NumberOfSharedInterests) \n NumberOfPhotos/: \(NumberOfPhotos)"
}
init(name: NSString?, image: UIImage?, age: NSNumber?, sharedFriends: NSNumber?, sharedInterest: NSNumber?, photos:NSNumber?) {
self.Name = name ?? ""
self.Image = image
self.Age = age ?? 0
self.NumberOfSharedFriends = sharedFriends ?? 0
self.NumberOfSharedInterests = sharedInterest ?? 0
self.NumberOfPhotos = photos ?? 0
}
}