Conclusion
Heads up... You’re accessing parts of this content for free, with some sections shown as text.
Heads up... You’re accessing parts of this content for free, with some sections shown as text.
Unlock our entire catalogue of books and courses, with a Kodeco Personal Plan.
Unlock now
You’ve learned a lot about classes in this lesson:
- You defined a
MuseumObjecttype with properties and instantiated some objects. - You implemented a
showImagemethod, using theisPublicDomainproperty to determine whether to useMuseumComposableorWebViewComposable. - With one art object in the public domain and one not in the public domain, you called
showImage(). - You demonstrated how classes are reference types by creating a new object that points to a
MuseumObjectobject and changing the title. - Finally, you hid a property by making it
private.