Conclusion

Heads up... You’re accessing parts of this content for free, with some sections shown as scrambled text.

Heads up... You’re accessing parts of this content for free, with some sections shown as scrambled 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 MuseumObject type with properties and instantiated some objects.
  • You implemented a showImage method, using the isPublicDomain property to determine whether to use MuseumComposable or WebViewComposable.
  • 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 MuseumObject object and changing the title.
  • Finally, you hid a property by making it private.
See forum comments
Download course materials from Github
Previous: Demo Next: Classes & Objects Quiz