Conclusion
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.