I've got this class called User.
class User {
var firstName: String
var lastName: String
init(firstName: String, lastName: String) {
self.firstName = firstName
self.lastName = lastName
}
func fullName() -> String {
return "\(firstName) \(lastName)"
}
}
In a swift playground page called "User Object" I've then got a playground page that is called "Main Program"
I would like to link the "User Object" page and the "Main Program" page together, so that I could something like this in the "Main Program" Page;
let User1 = User(firstName: "John", lastName: "Smith")
print(User1.fullName())
How do I link up these two pages in swift playgrounds
Thank you